VBA, Macros, functions, or formulas

  • Thread starter Thread starter Miss A
  • Start date Start date
M

Miss A

Hi, I am trying to figure out how to do the following:

Say, for example, I have the following data:

Item A, brown, size 12
Item B, pink, size 10
Item C, pink, size 12
Item D, brown, size 12
Item E, pink, size 6

How do I set up my spreadsheet so that I can find out how
many items are brown AND size 12. Is there some script
or formula that I can use to count the instances of
brown? Is there a script/formula that can count the
instances of brown AND size 12? Please consider that I
my actual data has more 400 items, not just 5. Also
consider that I would like to be able to apply the macro
to new sets of data on a regular basis.

If there is anyone who can reply with step by step
instructions then I would appreciate it. I have never
created a macro or programmed with visual basic before.
 
Have you ever used a Pivot table?

That should provide you with the information you need and
you can use it in other data without problem.

Andres
 
--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
If you want a formula

=SUMPRODUCT(--(B1:B100="brown"),--(C1:C100="size 12"))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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