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

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
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.
 
Upvote 0
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).
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,488
Members
448,967
Latest member
visheshkotha

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