Excel "If" Statement Query

Matt Campbell

New Member
Joined
Jun 2, 2008
Messages
7
Hello,

I have a Sheet 1 with an Item Number and a corresponding value for that Item Number. If the corresponding value is greater than 0, I want Excel to search Sheet 2. Sheet 2 contains a list of Item Numbers. If the Item Number does not appear on Sheet 2, I want an "N/A" to appear on the first sheet. I hope I explained that well enough. Can anyone help me out with this?

- Matt
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
assuming

S1 - item number in A, value in B

=IF(B1>0,MATCH(A1,Sheet2!A:A,0),"")

will either give a value (row number) or Error

Assumes item numbers on Sheet2 are in column A
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,592
Members
449,089
Latest member
Motoracer88

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