If Offset Index Match Returns Non-Numeric Value, Return Second Index Match

ERLoft

Board Regular
Joined
Feb 24, 2006
Messages
193
Need help with the last part of this formula please. The original formula worked great until I realized that the imported data had a duplicate value in a row that I'm wanting to ignore. Correct values have a numeric value in column 1 of the data range, so if the formula encounters a non-numeric value there, I want the formula to return the second instance of the result.

Here's the formula I have thus far:

=IFERROR(IF(ISNUMBER(INDEX(DCData,MATCH($A281,DCCD,0),1)),INDEX(DCData,MATCH($A281,DCCD,0),3),"Not Number"),0)

DCData Refers to $A:$Z on an import sheet, while DCCD Refers to $B:$B on the same import sheet. This formula does fine in up until the portion that shows as "Not Number". In here, I need help with the portion of the formula that will return the second match of $A281, DCCD,0.

Any help would be greatly appreciated. I feel like I should have figured this out, but am battling a cold and feel a bit out of whack.
Eric
 
Last edited:

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Shouldn't this just be

=IFERROR(INDEX(DCData,MATCH($A281,DCCD,0),IF(ISNUMBER(INDEX(DCData,MATCH($A281,DCCD,0),1)),1,3)),0)

ie if column 1 is a number use column 1 else use column 3
 
Last edited:
Upvote 0
I didn't try that to see if it would work, as upon closer review, the imported data, which is from a .txt file, had the error value as part of the header on each page - and there were nine pages. So I ended up using VBA to clear out all the values that didn't have a sequence number next to them.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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