Link to home
Create AccountLog in
Avatar of maximyshka
maximyshka

asked on

Excel Formula

How can I write using excel formula following excel functions: (it is IIf function in access)

IIf(a1=(20;32;59), "M", "C"))

a1 is a cell on excel spreadsheet which contains data.  

Please see below values on column a

20
33
56
59
32
59
95
ASKER CERTIFIED SOLUTION
Avatar of zorvek (Kevin Jones)
zorvek (Kevin Jones)
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
=iif(a1=20 or a1=32 or a1=59,"M","C")
Sorry

=iif([a1]=20 or [a1]=32 or [a1]=59,"M","C")
Are those some kind of a VBA'ish sort of cell formulas? Pretty cool!
> (it is IIf function in access)

For reference, the correct Access syntax would be:

=IIf(FieldA1 In (20,32,59), 'M', 'C')
(°v°)
Markus,

I believe Saqib's example in http:#a36158546 would also be valid in Access, no?

:)

Patrick
Naturally. I was specifically referring to maximyshka's version. — (^v°)
I, myself, do not know what I was trying to do. I only remember answering that question and probably went to sleep immediately after that. I do not even remember seeing the previous responses until I woke up now.