By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,455 Members | 2,157 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,455 IT Pros & Developers. It's quick & easy.

If Condition

P: 1
Hello All

I want to change this expression from Excel to Access
Expand|Select|Wrap|Line Numbers
  1. =IF(J6>500;"6";IF(J6>=200;"5";IF(J6>=100;"4";IF(J6>=50;"3";IF(J6>=10;"2";IF(J6>0;"1"))))))
Thank you.
Sep 19 '07 #1
Share this Question
Share on Google+
2 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
Hello All

I want to change this expression from Excel to Access

=IF(J6>500;"6";IF(J6>=200;"5";IF(J6>=100;"4";IF(J6 >=50;"3";IF(J6>=10;"2";IF(J6>0;"1"))))))

Thank you.
That would depend on the field name corresponding to J6. However, the conditional if statement in Access is ...

IIf(Condition, Value if True, Value if False)

So replace J6 with the field name
IF with IIf and ; with ,

This should get you near to what you require.
Sep 19 '07 #2

NeoPa
Expert Mod 15k+
P: 31,186
You may find that you don't need to replace the ";" with ",".
I'm not sure why some members seem to need ";" while the typical USA / Britain character is ",". Maybe it's in the regional settings somewhere. You will need to use the character that works for you.
Otherwise MMcCarthy's answer is as much as you can get for that question (and is right of course).
Sep 21 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.