Help with IF Function !!

gprogers

New Member
Joined
Sep 25, 2011
Messages
8
Trying to setup following function:

=IF(C4="AC","1",IF(C4="LAC","2",IF(C4="CPL","3",IF(C4="SGT","4",IF(C4="FSGT","5",IF(C4="WOFF","6",IF(C4="FLGOFF","7",IF(C4="FLTLT","8",IF(C4="SQNLDR","9",IF(C4="WGCDR","10",IF(C4="ACW","1",IF(C4="LACW","2","")))

Basically want values in cell C4 to trigger a number to be allocated in C2 depending on the rank.

Coming up with error....need help.
 
Ahh, I think the problem has to do with the fact that the numbers aren't ascending, the last 2 should be 11,12.
So, try this instead.
Code:
=IF(C4="","",CHOOSE(MATCH(C4,{"AC","LAC","CPL","SGT","FSGT","WOFF","FLGOFF","FLTLT","SQNLDR","WGCDR","ACW","LACW"},0),1,2,3,4,5,6,7,8,9,10,1,2))
my apologies for the error.
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,224,582
Messages
6,179,670
Members
452,936
Latest member
anamikabhargaw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top