autofill cell

kensaje

New Member
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

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
One example: =IF(B1="SGT","E5","")

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.

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

Replies
1
Views
82
Replies
1
Views
120
Replies
1
Views
92
Replies
2
Views
189
Replies
3
Views
146

1,220,010
Messages
6,151,443
Members
451,028
Latest member
greekness1

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.

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

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