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!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

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).
 

Forum statistics

Threads
1,144,611
Messages
5,725,311
Members
422,610
Latest member
sanantonio

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
Top