×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • 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.

Students Click Here

Need help on how to create a formula

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,

Convert your table to Structured Table, assuming every column in your table has unique headers. So list the headers for columns a,b,c&e.

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,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

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,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

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 bigsmile

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,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

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,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

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,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

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.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


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
Design for Additive Manufacturing (DfAM)
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:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close