I have a table, and I want to do a Vlookup on Column1, and when I find what I
am looking for, I want to sum column 2 from that row down to the bottom of
the table.
For example,
Item 1 2345
Item 2 3478
Item 3 1298
Item 4 123
Item 5 1233
I want to find "Item 3" and then I want to be able to return the sum of
(1298+123+1233).
How would I do this? My thoughts were that I would do a lookup to get the
row numner of "Item 3" and then do a sum() with the cell range starting from
the row where I found "Item 3" but I'm not sure how to do that.
Thanks,
Steve
|
|
0
|
|
|
|
Reply
|
Utf
|
1/20/2010 1:51:03 PM |
|
Hi,
I may have overdone this, i'm sure there's a simpler solution but in the
meantime try this
=SUM(INDIRECT("B" & MATCH("item 3",A:A) &":B"& MATCH(LOOKUP(10^99,B:B),B:B)))
Mike
--
Mike
When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
"Steve Haack" wrote:
> I have a table, and I want to do a Vlookup on Column1, and when I find what I
> am looking for, I want to sum column 2 from that row down to the bottom of
> the table.
>
> For example,
> Item 1 2345
> Item 2 3478
> Item 3 1298
> Item 4 123
> Item 5 1233
>
> I want to find "Item 3" and then I want to be able to return the sum of
> (1298+123+1233).
>
> How would I do this? My thoughts were that I would do a lookup to get the
> row numner of "Item 3" and then do a sum() with the cell range starting from
> the row where I found "Item 3" but I'm not sure how to do that.
>
> Thanks,
> Steve
|
|
0
|
|
|
|
Reply
|
Utf
|
1/20/2010 2:06:01 PM
|
|
I put you data in A1:B5
In G1 I type: Item3
In H1 I used formula: =ADDRESS(MATCH(G1,A:A,0),2) which returned $B$3
In I1 I used formula: =SUM(INDIRECT(H1&":B100")) which retuned 2654 as
required
It would be easy to combine H1 and I1
What if your data began in row 3, for example? Formula in H1 returns $B$5
and all is well
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
"Steve Haack" <SteveHaack@discussions.microsoft.com> wrote in message
news:45162502-E85B-48C6-8072-7D8E073DD906@microsoft.com...
> I have a table, and I want to do a Vlookup on Column1, and when I find
> what I
> am looking for, I want to sum column 2 from that row down to the bottom of
> the table.
>
> For example,
> Item 1 2345
> Item 2 3478
> Item 3 1298
> Item 4 123
> Item 5 1233
>
> I want to find "Item 3" and then I want to be able to return the sum of
> (1298+123+1233).
>
> How would I do this? My thoughts were that I would do a lookup to get the
> row numner of "Item 3" and then do a sum() with the cell range starting
> from
> the row where I found "Item 3" but I'm not sure how to do that.
>
> Thanks,
> Steve
|
|
0
|
|
|
|
Reply
|
Bernard
|
1/20/2010 2:14:07 PM
|
|
Try this...
Data in the range A2:B6
D2 = lookup value = Item 3
=SUM(B6:INDEX(B2:B6,MATCH(D2,A2:A6,0)))
--
Biff
Microsoft Excel MVP
"Steve Haack" <SteveHaack@discussions.microsoft.com> wrote in message
news:45162502-E85B-48C6-8072-7D8E073DD906@microsoft.com...
>I have a table, and I want to do a Vlookup on Column1, and when I find what
>I
> am looking for, I want to sum column 2 from that row down to the bottom of
> the table.
>
> For example,
> Item 1 2345
> Item 2 3478
> Item 3 1298
> Item 4 123
> Item 5 1233
>
> I want to find "Item 3" and then I want to be able to return the sum of
> (1298+123+1233).
>
> How would I do this? My thoughts were that I would do a lookup to get the
> row numner of "Item 3" and then do a sum() with the cell range starting
> from
> the row where I found "Item 3" but I'm not sure how to do that.
>
> Thanks,
> Steve
|
|
0
|
|
|
|
Reply
|
T
|
1/20/2010 7:07:34 PM
|
|
|
3 Replies
908 Views
(page loaded in 0.153 seconds)
Similiar Articles: VLOOKUP to return Cell Address - microsoft.public.excel.worksheet ...I have a table, and I want to do a Vlookup on Column1, and when I find what I am looking for, I want to sum column 2 from that row down to the botto... VLOOKUP returns formula instead of result - microsoft.public.excel ...I want to use a logical IF formula to return a cell range SUM, or at least a ... VLOOKUP to return Cell Address ... want it to return a cell address rather than the result ... Vlookup return Zero if not there - microsoft.public.excel ...VBA =Address(4, 5) would return "$E$4" Not ... VLOOKUP with ... To Return The Cell Address Is there a way to get the vlookup function to return ... Returning Multiple values from A Vlookup - microsoft.public.excel ...VLOOKUP to return Cell Address - microsoft.public.excel.worksheet ..... public.excel ..... the workbook, I would like to return all sheets to cell ... Vlookup return most recent date (value) - microsoft.public.excel ...... the other two tables and return the up to date ... returned will always reflect the current values in ... Function To Return The Cell Address Vlookup Function To Return ... Using VLOOKUP to find colours - microsoft.public.excel.worksheet ...Using VLOOKUP to find colours - microsoft.public.excel.worksheet ... VLOOKUP to return Cell Address - microsoft.public.excel.worksheet ... I have a table, and I want to do ... how to vlookup of one cell by starting 2 digits of another cell ...Starting in D1 I have a column of ... the alternate query IDs in cell c1... Col A Col B Col C 1 7:21 PM 3 1 7:22 PM 2 ... Function To Return The Cell Address Vlookup ... Vlookup but two rows below - microsoft.public.excel.worksheet ...VLOOKUP to return Cell Address - microsoft.public.excel.worksheet ... Vlookup but two rows below - microsoft.public.excel.worksheet ... VLOOKUP to return Cell Address ... vlookup is reporting 0 when I want it to show a blank cell ...VLOOKUP & Hyperlinks - microsoft.public.excel.worksheet ... 0 ... return Cell Address - microsoft.public.excel.worksheet ... I have a table, and I want to do a Vlookup ... Return All Sheets to Cell A1 before save - microsoft.public.excel ...Before saving the workbook, I would like to return all sheets to cell A1 except ... VLOOKUP to return Cell Address - microsoft.public.excel.worksheet ... Return All Sheets ... USING VLOOKUP TO RETURN A CELL ADDRESS - WUGNET ForumsI am trying to use the VLOOKUP command but want it to return a cell address rather than the result, i tried ADDRESS but to no avail as i wouldn't know its position ... Excel :: Vlookup Function To Return The Cell AddressVlookup Function To Return The Cell Address Is there a way to get the vlookup function to return the cell address, rather than the value, of the lookup? Vlookup returning a cell address: vlookup, address, cell, returnHow can you get a vlookup function to return the cell address rather than the value in a selected table. Ie. A list of information is contained in a range A1:D10. A ... USING VLOOKUP TO RETURN A CELL ADDRESS - ExcelBanterExcel Worksheet Functions ... I am trying to use the VLOOKUP command but want it to return a cell address rather ... Say your lookup table is in A1:B7 and the lookup ... Excel - Display Cell Address From Vlookup - I found a cell ...I found a cell in a list of data using vlookup and I want to return it's cell address. how can this be done? 7/22/2012 5:14:20 AM
|