What's wrong with this IF?

J

Jay07

=IF(H2="PM01","Emergency Works",IF(H2="PM02","Routin
Works",IF(H2=PM03,"Pre Planned Maintenance")))

Column H can only contain either of PM01, PM02 or PM03. I want Column
to show the above values for each option.

It works for both PM01 & PM02 but I'm just getting #NAME? for PM03.



Thanks in advance
 
V

Vacuum Sealed

=IF(H2="PM01","Emergency Works",IF(H2="PM02","Routine
Works",IF(H2=PM03,"Pre Planned Maintenance")))

Column H can only contain either of PM01, PM02 or PM03. I want Column I
to show the above values for each option.

It works for both PM01 & PM02 but I'm just getting #NAME? for PM03.



Thanks in advance.
Hi

Try this

=IF(H2="","",IF(H2="PM01","Emergency Works",IF(H2="PM02","Routine
Works","Pre Planned Maintenance")))

This takes into account a 4th condition being that H2 is blank.

HTH
Mick.
 
V

Vacuum Sealed

=IF(H2="","",IF(H2="PM01","Emergency Works",IF(H2="PM02","Routine
Works","Pre Planned Maintenance")))

Erata.

Try this instead as the previous left the 3rd condition open and allowed
for any value to be entered for it...

=IF(H2="PM01","Emergency Works",IF(H2="PM02","Routine
Works",IF(H2="PM03","Pre Planned Maintenance","")))

Cheers
Mick.
 

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

Top