Solved

How sumproduct & counta with a twist?

Posted on 2014-04-26
6
363 Views
Last Modified: 2014-04-27
I need a macro that would do the following:
Look in column A and make list of all "Products" listing just the first "Serial" number.
Then sum all three "TYPE"...MX, SX and HX.

I have attached a file to better explain.
Jimi
sumproduct---counta-with-a-twist.xlsx
0
Comment
Question by:Jimi Sherman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 40

Expert Comment

by:als315
ID: 40025375
You can do it with pivot table (just hide some columns and First Serial Number is minimum)
sumproduct---counta-with-a-twist.xlsx
0
 
LVL 22

Expert Comment

by:Flyster
ID: 40025384
You can use COUNTIFS for those results. The formula in G2 would be:

=COUNTIFS(A:A,$E2,C:C,G$1)

Flyster
sumproduct---counta-with-a-twist.xlsx
0
 

Author Comment

by:Jimi Sherman
ID: 40025385
A pivot table will not work for what I doing. The worksheet will change daily and this is only one part of a bigger process I am putting together.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Jimi Sherman
ID: 40025388
Hi Flyster,
But what about this part...making list of all "Products" listing just the first "Serial" number?
0
 
LVL 22

Accepted Solution

by:
Flyster earned 500 total points
ID: 40025415
Took a little time for this one. For the List, you can use this formula:

=INDEX($B$2:$B$38, MATCH(0, COUNTIF($F$1:F1, $B$2:$B$38), 0))

To list the first serial number, I added a column which counts the number of occurrences of each product. You can hide it.  Then for serial number you use this:

=SUMPRODUCT((B2:B38=$F2)*(A2:A38=1)*(C2:C38))
sumproduct---counta-with-a-twist.xlsx
0
 

Author Closing Comment

by:Jimi Sherman
ID: 40026248
That will work. Thanks
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question