ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using H/VLOOKUP to return multiple values (https://www.excelbanter.com/excel-discussion-misc-queries/225502-using-h-vlookup-return-multiple-values.html)

Hennessy

Using H/VLOOKUP to return multiple values
 
I am trying to use VLOOKUP to return the sum of corresponding columns to the
reference i search for. for example on wksht 2, i want column B to return the
sum of columns B-F on wksht 1 if the cell in column A (wksht1) is X. I
currently have it set up as such, but i have multiple entries on wksht 1
column A that = X. Is there a way to code "retun the sum of columns B-F if
A=X for all values =X in column A?

I concede this probably sounds confusing, but i am not of a wordsmith mind
at the moment.

Daniel.C[_3_]

Using H/VLOOKUP to return multiple values
 
Array formula (validate with Ctrl+Shift+Enter) :
=SUM((Sheet1!A1:A100="x")*Sheet1!B1:F100)
HTH
Daniel

I am trying to use VLOOKUP to return the sum of corresponding columns to the
reference i search for. for example on wksht 2, i want column B to return the
sum of columns B-F on wksht 1 if the cell in column A (wksht1) is X. I
currently have it set up as such, but i have multiple entries on wksht 1
column A that = X. Is there a way to code "retun the sum of columns B-F if
A=X for all values =X in column A?

I concede this probably sounds confusing, but i am not of a wordsmith mind
at the moment.




Luke M

Using H/VLOOKUP to return multiple values
 
Perhaps the array* formula:
=SUM(IF(A2:A100="X",B2:F100,0))

*Use Ctrl+Shift+Enter to confirm formula.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Hennessy" wrote:

I am trying to use VLOOKUP to return the sum of corresponding columns to the
reference i search for. for example on wksht 2, i want column B to return the
sum of columns B-F on wksht 1 if the cell in column A (wksht1) is X. I
currently have it set up as such, but i have multiple entries on wksht 1
column A that = X. Is there a way to code "retun the sum of columns B-F if
A=X for all values =X in column A?

I concede this probably sounds confusing, but i am not of a wordsmith mind
at the moment.



All times are GMT +1. The time now is 04:01 AM.

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