ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional statements in MS-Query? (https://www.excelbanter.com/excel-discussion-misc-queries/113022-conditional-statements-ms-query.html)

Jim Moberg

Conditional statements in MS-Query?
 
Hi,

I just recently started working with MS-Query to pull data into spread
sheets and now I'm trying to add a field that would evaluate the value of two
other fields and set it's value accordingly.

For example, I'm trying to set the value for FieldC. SoIF FieldA=1 and
FieldB = D then FieldC=ABC ELSE IF FieldA=1 and FieldB = E THEN FieldC=XYZ.
I'm able to do this in MS-Access but keep getting syntax errors in MS-Query.

Is this possible in MS-Query?


All times are GMT +1. The time now is 08:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com