Find a value in a range of cells and if it doesn't find it return a specifeied row

lwhyatt

New Member
Joined
May 26, 2010
Messages
33
I have a workbook with 3 worksheets A, B and C. I want to look up values from column 1 of worksheet B and if it doesn't find a match in column 1 of worksheet A, then return the information contained in the row of its entry in worksheet B. The results are to appear in new worksheet C without blank rows. Can anybody suggest an appropriate formula to use?

Many thanks in advance

Lyndon
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Book1
AB
12A
23A
35A
47A
A



Book1
AB
11B
22B
33B
44B
55B
66B
77B
88B
99B
1010B
B



Book1
AB
11B
22A
33A
44B
55A
66B
77A
88B
99B
1010B
C
Cell Formulas
RangeFormula
A1=B!$A1
B1=IFERROR(INDEX(A!$B:$B,MATCH($A1,A!$A:$A,0)),B!$B1)


WBD
 
Upvote 0
Not quite..


Worksheet C would look like

1 B
6 B
7 B
8 B
9 B
10 B

since 1,6,7,8,9,10 only do not appear in worksheet A compared to worksheet B, and they are all B as this data has been bought over from their respective rows in worksheet B to the new worksheet C.
 
Upvote 0
OK. Try this in A1 on sheet C:

Code:
=IFERROR(INDEX(B!A$1:A$10,SMALL(IF(NOT(ISNUMBER(MATCH(B!$A$1:$A$10,A!$A$1:$A$4,0))),ROW(B!$A$1:$A$10)),ROWS($A$1:$A1))),"")

Enter with Ctrl+Shift+Enter to create an array formula. Change the $10 to be the last row on Sheet B and the $4 to be the last row on Sheet A. Copy across and down on Sheet C as necessary.

WBD
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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