Change military grades into rank

air force guy

New Member
Joined
Apr 17, 2010
Messages
28
Afternoon all
Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work consistently, sometimes blank cell is civilian and formula stops working
 
Excel Formulas.xlsx
CDEFG
1GRADERANKExer/RealPlan
212 LT01A1A
321 LT01B1B
43Capt01C1C
54Maj01D1D
65Lt Col01E1E
76Col01F1F
87Brig Gen
98Maj Gen
109Lt Gen
1110Gen
12CIV
1331E1
1432E2
1533E3
1634E4
1735E5
1836E6
1937E7
2038E8
2139E9
Sheet1
Cell Formulas
RangeFormula
D2:D21D2=IF(C2=1,"2 LT",IF(C2=2,"1 LT",IF(C2=3,"Capt",IF(C2=4,"Maj",IF(C2=5,"Lt Col",IF(C2=6,"Col",IF(C2=7,"Brig Gen",IF(C2=8,"Maj Gen",IF(C2=9,"Lt Gen",IF(C2=10,"Gen",IF(C2=31,"E1",IF(C2=32,"E2",IF(C2=33,"E3",IF(C2=34,"E4",IF(C2=35,"E5",IF(C2=36,"E6",IF(C2=37,"E7",IF(C2=38,"E8",IF(C2=39,"E9",IF(C2="","CIV"))))))))))))))))))))
Going to use same IF formula for "Exer/Real" column that I used in Grade/Rank columns
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
All you do is select your range, click that tab, click capture range, click generate output (you'll probably get a message box to ok) and paste in the reply window.

I'll look at it tomorrow if no-one else does as getting close to 1am here.
Holy smokes...thanks again
 
Upvote 0
As I said I'll look at it tomorrow if no-one else does as getting close to 1am here but in the meantime can you explain what you want to appear in Exer/Real as I am still not 100% clear, I assume what is in the Plan column?

sometimes blank cell is civilian and formula stops workin
This might be an issue. How is Excel going to tell the difference between a cell that is blank that reference civilian and a blank cell that doesn't?
 
Upvote 0
As I said I'll look at it tomorrow if no-one else does as getting close to 1am here but in the meantime can you explain what you want to appear in Exer/Real as I am still not 100% clear, I assume what is in the Plan column?


This might be an issue. How is Excel going to tell the difference between a cell that is blank that reference civilian and a blank cell that doesn't?
the blank cell is no longer the issue (when you mention spaces in the cell I went back and took out all the extra space and it works as it should)
the Exercise/Real column references the plan column. It looks at that plan and (via the IF formula) I will tell it what is real and what is exercise (I have a table to reference)
 
Upvote 0
the blank cell is no longer the issue (when you mention spaces in the cell I went back and took out all the extra space and it works as it should)
the Exercise/Real column references the plan column. It looks at that plan and (via the IF formula) I will tell it what is real and what is exercise (I have a table to reference)
My question is...can I do it quicker without writing that long IF formula?
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,559
Members
449,089
Latest member
Motoracer88

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