Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query to Excel 1

Status
Not open for further replies.

ibsuntan

MIS
Dec 11, 2002
10
US
Hi all,
New here, very helpful board.
My question is .. got a query sending to Spreadsheet, I want to create a new column if I match a certain criteria,
Do I create if and then statement? or try to create a "like'statement?.
if application name = "MC\*" ...then create column name "Action" any time that the query finds MC\ I need the word ADD in the Action column of the speadsheet.
I know this is pretty vage, but any help wil be appreciated.
Thanks
Gregg
 
Sounds like the "Immediate If" function IIF() might work for you here.

In Access, you'd create a new column in the query like
ACTION:IIF(left([application name],3) = "MC\", "ADD", "")

The downside is that IIF() can sometimes be slow with large tables.

HTH
 
Forgot to answer back that work!!!! Thanks for the help
Gregg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top