Formula to Mark a Cell and Place a Corresponding Value in another Cell

OZEXCEL

New Member
Joined
Jan 16, 2015
Messages
2
Hello,

I am new to Excel, so this may be a basic question. I have two Columns:

A B
1
2
3
4
5

I would like to create a formula in one cell (E2) such that if I place an "x" (or a number perhaps) in a cell in column B, the corresponding value in Column A will appear in cell E2. For example, if I place an x in B3, a "3" (from A3) would appear in E2. If I placed an "x" in E4, a "4" would appear in E2, instead.

Please help!

Thank you,

Oz
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Misread question, let me put a little more thought into it.

maybe try putting
=IF(B1>1,A1,0)
into cell E2, I think that does what you want. As long as the value in B is greater than 0.
 
Last edited:
Upvote 0
If you want it to populate column E if anything is in column B, try:

=IF(B1<>"",A1,"")
 
Upvote 0
Thank you all!

Looks like the =SUMIF(B1:B5,"x",A1:A5) worked so that it covered the entire range! Thank you, Chris!

bbot, The =IF(B1<>"",A1,"") worked too, but only for one cell at a time. I wanted it to only apply to one cell (E2) not the entire E column. For example, if I place an x in B2, then cell E2 will show a 2. If I place the x in B4, then cell E2 will show a 4. Basically, I wanted it to apply to the range of A and B, but only in one cell (E2). I don't think my question was that clear> sorry about that. But thank you for your help.
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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