Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum of VLOOKUPS 1

Status
Not open for further replies.

EcoWill

Technical User
Jun 8, 2011
49
US
Hi all - maybe I am not going about this in the right way, but i have repeating groups of categories with values associated with them. I can use VLOOKUP to get the values associated with each category separately but i want to sum the numbers of all the VLOOKUPs. How can one do this? Thanks,,
 
I can put it another way: I have in one column (A) Monday, Tuesday, Wednesday... etc, then repeating over and over again, Monday, Tuesday, Wednesday... Each day has a number associated with it in Column (B), like the first Monday has 235.24 but the second Monday is 562.57, etc. On another worksheet i want to sum up all of the Monday values, then a sum of all the Tuesday values, etc. I cannot use a pivot table to do this. Can i use the sum of VLOOKUPs and what would the syntax be? Thanks...
 



Hi,

Check out the SUMIF function.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I did that. I used this:

=SUMIF(P3:p595,(VLOOKUP(Criteria,B4:B595,15,FALSE)))

but it is returning all zeros even though column 15 has the values that I am trying to sum. Something in there is incorrect.
 


[tt]
=SUMIF(P3:p595,Criteria)
[/tt]


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 


sorry...
[tt]
=SUMIF(B3:B595,Criteria,P3:p595)
[/tt]


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Wow. Good job - It appears that that gives me real answers. Until I run a check-sum I won't know but it looks like this nailed it. I love Tek-tips!
 
How did that happen without any lookup function involved? If i do it on an adjacent spreadsheet in the workbook it appears to break down. (in other words I probably want to put these aggregates on another page but referencing and summarizing the data that is on the data page) Hope that makes sense.
 
Yep...if i attempt that formula from another sheet the numbers come out wrong. I don't get it.
 
MY MISTAKE. IT WORKS FINE. SORRY TO BOTHER YOU.
 
You might also like to consider pivot tables for this sort of aggregation.
 



a LOOKUP function, like VLOOKUP, INDEX, MATCH to name a few, returns a descrete value from a table based on a criteria. It can be a numeric value, a text value or a boolean value.

a AGGREGATION function, like SUMIF, COUNTIF to name a few, returns an aggregation from a a table based on a criteria. Excel 2007 has additional aggregation function that extend these capabilities to multiple criteria.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top