Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-18-2018, 02:01 PM
Formd Formd is offline If Statement with "and" and "Or Windows 7 32bit If Statement with "and" and "Or Office 2007
Advanced Beginner
If Statement with "and" and "Or
 
Join Date: Feb 2015
Location: TX
Posts: 49
Formd is on a distinguished road
Default If Statement with "and" and "Or

I hope you can help me with this problem. I am not a pro at this but each day I am learning something new.

Here is what I want to accomplish.

If {Field Rep} = "" AND if {Field Role} = Rec\Rpt\Ord OR Rec\Rpt OR Rpt\Ord OR Ord OR Rec then insert {Field Address} else {AltAdd}.

If {Rep} <> "" And {Rep} has data, my outcome should be:

Company #1
123 NW 19th St, Washington DC 11111

However, If {Rep} = "" then my outcome should be:

Joe Blo
8901 Coral Ave, New York, NY 22222

Below is what I tried to accomplish this but it didn't work.

{IF{= OR ({ COMPARE {Field Rep} = Rec\Rpt\Ord}, {COMPARE {Field Rep} = Rec\Rpt}, {COMPARE {Field Rep} = Rpt\Ord},{ COMPARE {Field Rep} = Ord}, { COMPARE {Field Rep} = Rec }) {Rep}
{Address}" "


{Altname}
{AltAdd}"}

I attached a spreadsheet to see an example of the db.

Thanks in advance for your help.
Attached Files
File Type: xls Reps Db.xls (33.5 KB, 16 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Combine "sort within groups" and "identify duplicate/unique values" in two different variables. civilcervant Excel 3 06-12-2017 07:27 AM
Need help with conditional formatting & returning "Pass" / "Fail Results" in a Column N mikey386 Excel 2 12-11-2014 01:14 PM
remove repeated words with " macro " or " wild cards " in texts with parentheses and commas jocke321 Word VBA 2 12-10-2014 11:27 AM
If Statement with &quot;and&quot; and &quot;Or IF statement just generates text "MERGEFIELD" in document - what am I doing wrong? Eri Mail Merge 1 03-03-2012 03:03 PM
If Statement with &quot;and&quot; and &quot;Or How to choose a "List" for certain "Heading" from "Modify" tool? Jamal NUMAN Word 2 07-03-2011 03:11 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:58 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft