On my attached sheet, 'Totals' is to be a count of all the different vehicle types on the 'Type' sheet.  When I am looking to have done is to have the count of the 'Type of Vehicle' in the 'Type' sheet placed into the appropriate cell on the 'Totals' sheet.  For my example, on the 'Total's sheet, it should say: Cars - 3, Trucks 4.  (this is a 1% sample of my data - my actual data is 90,000+ rows, with many different types of vehicles).

I know I can perform a sort/filter to get my totals, but wanted to see if I could get a macro or something to do it for me instead since the numbers are always changing.  In addition, once you get me started with a macro, then I can add the other vehicle types.

Thank you,
James
ExpertsExchange-Question8.xlsx
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

EngineerCommented:
If you make A3=CAR and A4=TRUCK on the totals sheet then enter this formula in B3 and copy down

=SUMIF(Type!B:B,SUBSTITUTE(A3,"TOTAL OF ",""),Type!C:C)
0

Author Commented:
Thank you.  I have performed this but not sure why it is not working.  Did I enter incorrectly?  (see attached).
ExpertsExchange-Question8.xlsx
0

Commented:
You need a COUNTIF, not s SUMIF.

Put the following in cell B3 on the Totals worksheet and copy it down to B4 as well.

=COUNTIF(Type!B:B,Totals!A3)
0

Experts Exchange Solution brought to you by ConnectWise

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
That worked.  Thank you!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.