Using ISNUMBER SEARCH with INDEX MATCH

Emile du Toit

New Member
Joined
Mar 7, 2015
Messages
22
Old but thorough product data
OLDSKUTitleDescription
Product XXXMr XX description detailed
Product YYYMr YY Description detailed
Product ZZZMr ZZ description detailed

<tbody>
</tbody>

New but sparse product data
NEWDescriptionWeightSKU
ProductA description simple20AAA
ProductZ description simple15ZZZ
ProductB description simple10BBB

<tbody>
</tbody>

Combining best new and old data
COMBINEDSKUTitleDescription
ProductA description simple
ProductZ description detailed
ProductB description simple

<tbody>
</tbody>

I am trying to combine data from a detailed old product spreadsheet with much sparser data that is available for new products. Where the old data is available (here we are just going to look at the Description column) I want to add this data into the cell. Where a product is new though - and so it is not already detailed on my old spreadsheet - I want to add the new spreadsheet Description (as this is all there is). As you can see although the OLD and COMBINED spreadsheets have the same column order, the NEW one does not.

So in the third spreadsheet I am working in the Description column to populate the descriptions. In the first cell (intersection of the first product row and Description column) I am comparing the first SKU (product identifier) of the NEW spreadsheet with the entire SKU column of the OLD spreadsheet, to see if the SKU already exists in the OLD spreadsheet. If it does match then I want the cell to include the OLD spreadsheet Description data from the product with the SKU that matches the NEW product. If the NEW spreadsheet SKU does not match the OLD spreadsheet SKU (ie it is a genuinely new product) then I want to populate the cell with the NEW spreadsheet Description data. You can see I have added in the correct data for the COMBINED spreadsheet Description column.

The formula I tried (to populate D2) was:
=IF(ISNUMBER(SEARCH('NEW'!$D2,'OLD'!$B$2:$B$4)),INDEX('OLD'!$D$2:$D$4,MATCH('NEW'!$D2,'OLD'!$B$2:$B$4,0)),'NEW'!B2)

However, there must be an error as it returns the NEW descriptions whether or not the SKU's match.

Please help!!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
How about something like this?


Excel 2010
ABCD
1OLDSKUTitleDescription
2ProductXXXMr XX description detailed
3ProductYYYMr YY Description detailed
4ProductZZZMr ZZ description detailed
OLD



Excel 2010
ABCD
1NEWDescriptionWeightSKU
2ProductA description simple20AAA
3ProductZ description simple15ZZZ
4ProductB description simple10BBB
NEW



Excel 2010
ABCD
1COMBINEDSKUTitleDescription
2ProductAAAA description simple
3ProductZZZZ description detailed
4ProductBBBB description simple
Combined
Cell Formulas
RangeFormula
D2=IFERROR(INDEX(OLD!D:D,MATCH(B2,OLD!B:B,0)),INDEX(NEW!B:B,MATCH(B2,NEW!D:D,0)))
 
Upvote 0
I think maybe you have an error - it is showing #N/A. Possibly the 'B2' you have needs to assigned to either the NEW or OLD spreadsheet?
 
Upvote 0
I think maybe you have an error - it is showing #N/A. Possibly the 'B2' you have needs to assigned to either the NEW or OLD spreadsheet?

As you can see from my example in post #2, the formula returns "A description simple" in D2 and not "#N/A".

B2 is in the "Combined" sheet (as is the formula) so it doesn't need a sheet reference since it is referring to B2 of the "Combined" sheet.

You need something unique in the "Combined" sheet to match against the "OLD" and "NEW" sheets so I added SKU's into the "Combined" sheet assuming that you simply left those out in your example.
 
Upvote 0
Thanks. Yes i can get it to provide SKU's for combined so that isn't a problem. However, I have used your exact equation and all three results are the 'simple' descriptions taken from the NEW sheet. This appears to be a similar problem to what I had with my equation (only taking data from the NEW sheet).
 
Upvote 0

Forum statistics

Threads
1,215,475
Messages
6,125,028
Members
449,205
Latest member
Eggy66

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