If..then statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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,

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




in message
news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top