Macro Loop to Count Copy

  • Thread starter Thread starter Ty
  • Start date Start date
T

Ty

I have two columns of data- I would like to count the number of
entries in col B based on col A, put the cell value for col b and its
count result in col E and F, respectively. For example, based on the
cell values of "ACA1196" in col A, the values "A320" and "A333" would
be put in col E and "5" and "1" in col F. SImilarly, for "ACA844",
"A333" and "A343" would placed in col E and "1" and "1" in col F. This
could be done till the end of the data which is approximately 2500
entries and there is a header for the data.

Thanks for your help,

Ty

Col A Col B
ACA1196 A320
ACA1196 A320
ACA1196 A320
ACA1196 A320
ACA1196 A320
ACA1196 A333
ACA844 A333
ACA844 A343
ACA850 A333
ACA850 C208
ACA850 A333
ACA850 B763
ACA850 B763
ACA850 C208
ACA850 B763
ACA850 B763
ACA850 A333
 
It works fine for the first two groups, but the third is scattered in column
B. Can it be sorted?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
What would be ideal is the following,

Col A Col B Col E Col F
ACA1196 A320 A320 5
ACA1196 A320
ACA1196 A320
ACA1196 A320
ACA1196 A320
ACA1196 A333
ACA844 A333 A333 1
ACA844 A343 A343 1
ACA850 A333 A333 3
ACA850 C208 B763 4
ACA850 A333 C208 2
ACA850 B763
ACA850 B763
ACA850 C208
ACA850 B763
ACA850 B763
ACA850 A333

Thanks,

Ty
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top