autofill cell

kensaje

New Member
Joined
Sep 28, 2006
Messages
2
I'm working with a report for my ARMY unit and I need a formula that will fill out one cell depending on the info. on the previous cell, for example if i write "SGT" in cell B1 I want cell C1 to show "E5".
Thanks!
 

Some videos you may like

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

kensaje

New Member
Joined
Sep 28, 2006
Messages
2
It work out great but I'm affraid I need a little more help, I'm working on this report that includes different ranks, from PV2 all the way to Maj., and in cell B4 - B173 I'll be writing the rank and in cells C4 - C173 the grades,
example:
B4 C4
PV2 E2
SPC E4
SGT E5
and so on.
 

Von Pookie

MrExcel MVP
Joined
Feb 17, 2002
Messages
13,686
There are a couple different ways you could do that. The easiest would probably be a VLOOKUP formula. It will look for the value in the first column of the table and return the value from a column to the right.

=IF(B1="","",VLOOKUP(B1,$B$4:$C$175,2,0))

In this example: If B1 is blank, display nothing, otherwise find the value of B1 in the left-most column of the table B4:C175 and return the value from the 2nd column of the table (in this case, column C).
 

Watch MrExcel Video

Forum statistics

Threads
1,109,518
Messages
5,529,311
Members
409,862
Latest member
lbisacca
Top