Link to home
Start Free TrialLog in
Avatar of RWayneH
RWayneHFlag for United States of America

asked on

Same number of instances in two columns?

Looking for a macro that I can run that will tell me the number of instances that the number one is in column C and the number of instances that the number one is in column AG.  These should match.  If 6 in column C there should be 6 in column AG.

Ideally a dialog box that shows the results of each would be nice.  Thanks -R-
ASKER CERTIFIED SOLUTION
Avatar of Jacques Geday
Jacques Geday
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RWayneH

ASKER

EXCELent!!  Thanks -R-
Avatar of RWayneH

ASKER

Hold the bus...  Do I need to reformat the columns so it recongizes all the ones?  It is failing on the attached sheet.  Please advise and thanks. -R-
CountCAG-Error.xlsx
Avatar of RWayneH

ASKER

I noticed that AG is not the same length as C.  They can have different row amount in each column.  Is that a possible issue? -R-
Well I incorporated the macro to your workbook and renamed it as .xlsm and changed the maximum rows as seem it was the problem. Check this version and note that in your data Col AG has more rows than Col C maybe that is your problem. Go down in your data and you will see that Col C stops at row 66 and then Col AG keeps on till row 172 maybe this is your problem ??? Anyhow the previous version would compare only the first 66 rows now it goes far beyond that to ensure no rows are missed.

Let me know. Delay in reply due to diffrent time zones.
gowflow
CountCAG-Error.xlsm
Avatar of RWayneH

ASKER

Now it is good.  Thanks for the additional edit.  -R-
your welcome pls feel free to ask for me case u need it more adapted to what you want
gowflow