Lookup and compare two cell values

Blunder1

Active Member
Joined
Jun 2, 2010
Messages
250
Hi,
I have to reconcile two sheets within a workbook. There should be a common reference on most cells in column A, so i use the below formula to lookup and match to return my answer, where there isn't a common reference the returnng #N/A value tells me I need to investigate why. The below array formula works ok but is slow as there are around 8000 rows. Is there a faster way to replace the below using vba?
Thanks in advance
Blunder
Code:
{=INDEX(ODS!$A$2:$A$37,MATCH(1,(ODS!$A$2:$A$37=NTPA!A2)*(ODS!$N$2:$N$37=NTPA!M2)*(ODS!$O$2:$O$37=NTPA!N2),0))}
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I would suggest you concatenate Cols A, N & O on ODS sheet into a single delimited string at which point you can dispense with the Array.

Code:
ODS!Z2:
=$A2&"^"&$N2&"^"&$O2
copied down to Z37

Your subsequent formula is then a basic INDEX & MATCH which should prove relatively efficient.

Code:
=INDEX(ODS!$A$2:$A$37,MATCH(NTPA!A2&"^"&NTPA!M2&"^"&NTPA!N2,ODS!$Z$2:$Z$37,0))

Obviously use of Col Z is purely for demo. purposes - modify as appropriate.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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