VBA Excel To Match 2 columns on sheet A with 2 columns on sheet B and return value

itonic

New Member
Joined
Nov 10, 2016
Messages
6
I need a VBA Excel Script To Compare columns A & B in Worksheet One Against A & B In worksheet Two If A Match Is Found Return column C from Worksheet One.
Ive can do this in excel using a formula but it is speed im after so hopefully doing via VBA would be quicker and id prefer the final output of the table to only contain values instead of formulas.
Ive done a lot of digging but cant find this piticular requirement.
Any help on this is gratefully appreciated.
This is th excel formula im currently using
{=IFERROR(INDEX(SQLData!D:D,MATCH(1,(SQLData!A:A=A2)*(SQLData!B:B=B2),0)),"0")}

I have already asked this question on SO VBA Excel To Match 2 columns on A with 2 columns on B and return value - Stack Overflow however ive had no replies for a few days.
If this gets answered on either I will be sure to close and ref the answer.


 
Hi Stridhan

Superb bit of scripting, I cant thank you enough for taking the time out of your day to construct this and add the comments

Legend!!
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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