Vlookup and sum

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Vlookup to find "Period-to-Date" text in column A
Then I would like it to sum all the numbers in A2 that is next to the text in A1 that = "Period-to-Date
Thank you if you can help me
Ber

A1 A
Life-to-Date 7.1
Period-to-Date 162.3
Year-to-Date 2,970.9
Life-to-Date 3,254.5
Period-to-Date 64.7
Year-to-Date 2,054.1
Life-to-Date 4,307.6
Period-to-Date 15.1
Year-to-Date 1,509.1
Life-to-Date 2,074.8
Period-to-Date 25.9
Year-to-Date 292.4
Life-to-Date 1,888.2
 
VLOOKUP will not sum the numbers.

Use something like:

SUMIF(A1:A100,"Year-to-Date",B1:B100)
 
Bert,

VLOOKUP returns the first item it's looking for; it doesn't gather up a
bunch of them, which you need. But here are some possible solutions:

A pivot table will nicely total the Period-to-Date numbers. It will also
give you totals for the other categories, such as Life-to-Date, etc., which
you can hide if you don't want them. It must be refreshed when the data has
changed.

Or if you're only interested in Period-to-Date, you could use the following.
It doesn't need to be refreshed.

=SUMIF(A2:A14,"Period-to-Date",B2:B14)
 
I want to thank all of you for your reply. Yes, it did work for me
Ber

----- Bert wrote: ----

I am using Vlookup to find "Period-to-Date" text in column A
Then I would like it to sum all the numbers in A2 that is next to the text in A1 that = "Period-to-Date
Thank you if you can help me
Ber

A1 A
Life-to-Date 7.1
Period-to-Date 162.3
Year-to-Date 2,970.9
Life-to-Date 3,254.5
Period-to-Date 64.7
Year-to-Date 2,054.1
Life-to-Date 4,307.6
Period-to-Date 15.1
Year-to-Date 1,509.1
Life-to-Date 2,074.8
Period-to-Date 25.9
Year-to-Date 292.4
Life-to-Date 1,888.2
 
Back
Top