Lookup Value and Return Field Based on a Condition

dt293

New Member
Joined
Jul 25, 2011
Messages
2
Hi all,

A quick Excel question for the guru's.

If the value in Action is "Add" I would like to lookup the Price on sheet2 based on whether the Code from sheet1 exists anywhere in the Code column on sheet2. The Price should be returned to the Price column on sheet1.

Please see attached spreadsheet
Here

Hopefully I have explained this well enough. Any questions please let me know.

Thanks in advance.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi,

Welcome to the forum.

Formula in Sheet1 C2
=IF(A2="ADD",VLOOKUP(B2,Sheet2!$A$2:$B$8,2,0),0)

copy down

HTH

M.
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,820
Members
452,946
Latest member
JoseDavid

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