Hi,
I need some help with the vba macro. I have 2 excel sheets A and B. Sheet B is a subset of sheet A. I want to count the unique values in column B on sheet A and do the same on sheet B. I then want to compare the count values in the 2 sheets and if there is a mismatch it should display the all columns in sheet A on sheet C.
Example:
Sheet A has the following records in column B
HVAC_PARTS_3500012
HVAC_PARTS_3500012
HVAC_PARTS_3500033
HVAC_PARTS_3500033
HVAC_PARTS_3500034
HVAC_PARTS_3500034
This should show the count as
HVAC_PARTS_3500012 2
HVAC_PARTS_3500033 2
HVAC_PARTS_3500034 2
Sheet B has the following records in column B
HVAC_PARTS_3500012
HVAC_PARTS_3500012
HVAC_PARTS_3500033
HVAC_PARTS_3500034
This should show the count as
HVAC_PARTS_3500012 2
HVAC_PARTS_3500033 1
HVAC_PARTS_3500034 1
Sheet C should show all columns from sheet A for column B value equal to the following
HVAC_PARTS_3500033
HVAC_PARTS_3500034
Thanks in advance for your help.
I need some help with the vba macro. I have 2 excel sheets A and B. Sheet B is a subset of sheet A. I want to count the unique values in column B on sheet A and do the same on sheet B. I then want to compare the count values in the 2 sheets and if there is a mismatch it should display the all columns in sheet A on sheet C.
Example:
Sheet A has the following records in column B
HVAC_PARTS_3500012
HVAC_PARTS_3500012
HVAC_PARTS_3500033
HVAC_PARTS_3500033
HVAC_PARTS_3500034
HVAC_PARTS_3500034
This should show the count as
HVAC_PARTS_3500012 2
HVAC_PARTS_3500033 2
HVAC_PARTS_3500034 2
Sheet B has the following records in column B
HVAC_PARTS_3500012
HVAC_PARTS_3500012
HVAC_PARTS_3500033
HVAC_PARTS_3500034
This should show the count as
HVAC_PARTS_3500012 2
HVAC_PARTS_3500033 1
HVAC_PARTS_3500034 1
Sheet C should show all columns from sheet A for column B value equal to the following
HVAC_PARTS_3500033
HVAC_PARTS_3500034
Thanks in advance for your help.