# Thread: Sum - if a4 = "x" and w4="20" add up all the w4=20's in the rows from row named nameA to nameB

1. ## Sum - if a4 = "x" and w4="20" add up all the w4=20's in the rows from row named nameA to nameB

Sum - if a4 = "x" and w4="20" add up all the w4=20's in the rows from row named nameA to nameB

Or something like that...

Here's what I have:

a spreadsheet for registrations for an event, each row is a person, and column A gets the name of the registration type, e.g. "Two Day Pass" or "Friday Pass" etc, and W gets the amount charged. AND depending on WHEN they registered, the amount charged in W varies, thereby the complexity.

I need all the types and varying amounts so we can work out how many of each and what worked and didn't in the promo.
---------------
Ideally the formula would get the values to look up from a table with the various combinations. i.e.
Sum in cell C50 would get it's values from a table with "Two Day Pass" in A50 and "@0" in B50, etc.
--------------

Hope all that makes sense!

Thanks for ANY help, I'm not an Excel whiz, more a script kiddy
Grant

2. Could you post a sample of the workbook?

3. Here you go, guess I didn't describe as well as I might

Hopefully the attached will make it clear.

thanks!

4. Should the sheet you attached have rows of people? It doesn't. It has two small tables that I suspect are what you want to fill out...but, there isn't any data to based the calculations upon.

5. Each row would have user information such as email address and names, certainly - didn't think it was necessary as it shouldn't be relevant. I tried to keep it simple and focussed!

The first section is the rows of people, the second is the results. Sorry I now realise that wasn't clear!

6. Attached is a perhaps clearer example.

Thanks!

7. Something like this in C13. Adjust as needed and copy down the column.
=COUNTIFS(\$A\$4:\$A\$9,A13,\$W\$4:\$W\$9,B13)

Steve

8. ## The Following User Says Thank You to sdckapr For This Useful Post:

GrantHorizons (2014-02-10)

9. Nice, thanks Steve! That works great. A little playing with ranges and it's sorted.

Thanks a bunch, that makes my sheet MUCH nicer than my solution... you don't wanna know....

Grant

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•