Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Hi,
I have the following If statement; If query ID = "SAPBEXq0002" Then I want to add another query ID to this statement. I have tried separating them by a comma and got an error. e.g. If query ID = "SAPBEXq0002", "SAPBEXq006" Then. What is the best way to write this so that either query can be used. Thanks -- sheila |
#2
![]() |
|||
|
|||
![]()
Sheila,
Use code similar to the following: If queryID = "SAPBEXq0002" Or queryID = "SAPBEXq006" Then -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "sheila_d_pratt" wrote in message ... Hi, I have the following If statement; If query ID = "SAPBEXq0002" Then I want to add another query ID to this statement. I have tried separating them by a comma and got an error. e.g. If query ID = "SAPBEXq0002", "SAPBEXq006" Then. What is the best way to write this so that either query can be used. Thanks -- sheila |
#3
![]() |
|||
|
|||
![]()
Thanks for your help Chip!
"sheila_d_pratt" wrote: Hi, I have the following If statement; If query ID = "SAPBEXq0002" Then I want to add another query ID to this statement. I have tried separating them by a comma and got an error. e.g. If query ID = "SAPBEXq0002", "SAPBEXq006" Then. What is the best way to write this so that either query can be used. Thanks -- sheila |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ms excel IF statement w/pictures? | Links and Linking in Excel | |||
What statement to use? | Excel Worksheet Functions | |||
How do I fix a circular reference in a financial statement? | Excel Discussion (Misc queries) | |||
7+ nested if statement? | Excel Worksheet Functions | |||
Statement | Excel Worksheet Functions |