×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Need help on how to create a formula

Need help on how to create a formula

(OP)
Column A has names of people
Column B has months
Column C has week days

I would like to look for certain criteria in all three columns and sum up the totals from column E.

For instance
Ken may be in column A 13 times.
March is in Column B 34 times
Monday shows up in column C 57 times

All three of these are on the same row 6 times. I need a formula to give the sum of all 6 instances where all three fall in the same row.

How would you write that formula?

RE: Need help on how to create a formula

I would use the sumifs() function.

RE: Need help on how to create a formula

Ken,

The SUMPRODUCT() function will do nicely, as I can demonstrate with a table with Name, Month, Amt

=SUMPRODUCT((Table1[Name]=A2)*(Table1[Month]=B2)*(Table1[Amt]))

Skip,

Just traded in my OLD subtlety...
for a NUance!

RE: Need help on how to create a formula

..and the reason I ALWAYS use SUMPRODUCT, rather than SUMIFS or COUNTIFS is 1) its more intuitive and 2) becomes much more self documenting than using anonymous range references.

Skip,

Just traded in my OLD subtlety...
for a NUance!

RE: Need help on how to create a formula

(OP)
Ok I got it....

I was using the Sumif but for some reason it wasnt reading right. It turned out it was reading a cell it didnt like in one of the columns. I was using full columns "A:A" and I had to give it an actual range "A5:A500". Once I did that, it worked.

Hey Skip

I will look into that. For some reason because I am not real comfortable using tables, I always tend to shy away from them. lol
I need to just start using them to get used to them. Everyone keeps telling me I should. lol

RE: Need help on how to create a formula

So what's more understandable: A5:A500 or Table1[Names]?

It would even be better if the table name was something meaningful, too.

Skip,

Just traded in my OLD subtlety...
for a NUance!

RE: Need help on how to create a formula

Eventually Excel will work just like Jazz did.

RE: Need help on how to create a formula

What was Jazz & how did it work?

Skip,

Just traded in my OLD subtlety...
for a NUance!

RE: Need help on how to create a formula

An example...

=SUMPRODUCT((Table1[Name]=H$1)*(Table1[Month]=$F2)*(Table1[DOW]=$G2)*(Table1[Amt])) And if you were counting occurrences rather than summing and rather than using COUNTIFS() =SUMPRODUCT(--(Table1[Name]=H$1)*(Table1[Month]=$F2)*(Table1[DOW]=$G2))
NOTICE the similarities and the intuitive nature of each expression within parentheses as compared to having to put operators in QUOTES when using SUMIFS() and COUNTIFS()

Skip,

Just traded in my OLD subtlety...
for a NUance!

RE: Need help on how to create a formula

I think it's important to look at how you're going to use the formula, too. (Maybe it's obvious to everyone else, and I'm just missing it.) How do you know what you're looking for? If you have 20 different names, 12 months, and 7 days, you'll need to define the combination you want to count. This is how I would do it:

1) Create a list of all possible names, and name it Names (highlight the list, go to the upper right corner of the sheet to the "name box" and type in the name).
2) Repeat #1 for months and one for days.
3) Pick three cells, and in each one of them use Data Validation to create drop-down lists. Define the source as the name of your list. Now, you have drop down lists to define your search combination.
4) In cell D1, enter the formula =COUNTIF(A1,<Name Drop Down Cell>)+COUNIF(B1,<Month>)+COUNTIF(C1,<Day>)
5) In cell E1, enter the formula =COUNTIF(D1,3)
6) Wherever you want your total, enter the formula =SUM(E:E)

It's not as elegant as Skip's solution, but it's pretty straightforward and easy to do without relying on some of Excel's more "advanced" features.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a partâ€™s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!