Compare value

smartguy

Well-known Member
Joined
Jul 14, 2009
Messages
778
Hello all,

I have excel file in the below format.

Sheet1:

Excel Workbook
AB
1Datavalue
2451245617
3462547563
4481234
5451545454545
Sheet1


Sheet 2:

Excel Workbook
AB
1Datavalue
2451245617
3481234
4451545454545
Sheet2


I want to compare data based on "B" column value Sheet1 to Sheet2.

i want missing data in to sheet3.

Answer :

Excel Workbook
AB
1Datavalue
2462547563
Sheet3



Please help to provide VBA MAcro...
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi,

Please find the below Samples.

Sheet1:


Excel Workbook
AB
1Datavalue
2451245617
3462547563
4481234
Sheet1


Sheet2:

Excel Workbook
AB
1Datavalue
2451245617
3462547563
4481234
Sheet2


Both are sames i got error....

Error Line
Sheets("Sheet3").Range("A2").Resize(c, 2) = Ray
 
Last edited:
Upvote 0
Hi, Add this (in Red) to both codes:-
If all data matches then c = 0, and you can't resize a cell by 0.
Rich (BB code):
If c > 0 Then
Sheets("Sheet3").Range("A2").Resize(c, 2) = Ray
End If

Regards Mick
 
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,917
Members
452,949
Latest member
beartooth91

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