ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Either LOOKUP or INDEX Help (https://www.excelbanter.com/excel-worksheet-functions/159937-either-lookup-index-help.html)

Bob Walters[_2_]

Either LOOKUP or INDEX Help
 
I have been trying to calculate the sum value from the column of one
worksheet to a cell in another worksheet (all in the same workbook). I have
tried the VLOOKUP function where I establish the look_up_value and compare it
to an array in the other worksheet. It works except that the value it returns
is the last cell in the array that meets the look up value. I want it to SUM
all the applicable cells in that column that meet the look up value.

Any suggestions would be greatly appreciated.

Thanks!

Darren Bartrup[_2_]

Either LOOKUP or INDEX Help
 
Have you looked at the SUMIF function?

e.g. =SUMIF(Sheet1!A2:A5,"g",Sheet1!B2:B5) will sum all values in range
B2:B5 on Sheet1 where the corresponding values in range A2:A5 are 'g'.

Peo Sjoblom

Either LOOKUP or INDEX Help
 
=SUMIF(A2:A100,H2,B2:B100)

where H2 is the criteria and B2:B100 is the range you want to sum where
A2:A100 equals H2


adapt to fit your own data accordingly

--


Regards,


Peo Sjoblom



"Bob Walters" <Bob wrote in message
...
I have been trying to calculate the sum value from the column of one
worksheet to a cell in another worksheet (all in the same workbook). I
have
tried the VLOOKUP function where I establish the look_up_value and compare
it
to an array in the other worksheet. It works except that the value it
returns
is the last cell in the array that meets the look up value. I want it to
SUM
all the applicable cells in that column that meet the look up value.

Any suggestions would be greatly appreciated.

Thanks!




Bob Walters

Either LOOKUP or INDEX Help
 
Darren -

Perfect!! Thanks so much.

"Darren Bartrup" wrote:

Have you looked at the SUMIF function?

e.g. =SUMIF(Sheet1!A2:A5,"g",Sheet1!B2:B5) will sum all values in range
B2:B5 on Sheet1 where the corresponding values in range A2:A5 are 'g'.


Darren Bartrup[_2_]

Either LOOKUP or INDEX Help
 
No problem. Glad to help :)

"Bob Walters" wrote:

Darren -

Perfect!! Thanks so much.

"Darren Bartrup" wrote:

Have you looked at the SUMIF function?

e.g. =SUMIF(Sheet1!A2:A5,"g",Sheet1!B2:B5) will sum all values in range
B2:B5 on Sheet1 where the corresponding values in range A2:A5 are 'g'.



All times are GMT +1. The time now is 05:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com