ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   can I use vlookup to add multiple values (https://www.excelbanter.com/excel-discussion-misc-queries/257785-can-i-use-vlookup-add-multiple-values.html)

Carl Schreiner

can I use vlookup to add multiple values
 
I'm trying to sort through a long list of medical CPT codes with
corresponding payments. Is it possible to use the vlookup or other function
to total all the values that correspond to a certain CPT code? For examle -
I have the following list:

CPT Amt
10021 223.76
10021 240
10021 215
10021 96.74
10061 57.62
10061 15.37
11400 6
11401 49.39
11401 105.71
11403 63.5
11403 116.85

I would like to total all the amounts for the specific CPT code:

CPT Amt
10021
10021
10021
10021 775.5
10061
10061 72.99
11400 6
11401
11401 155.1
11403
11403 180.35

The list has a bout 8000 codes so I'm really looking for something that I
can just scroll down.
Thanks!






Per Jessen[_2_]

can I use vlookup to add multiple values
 
Hi

Use a Pivot Table - Select all your data, goto Data Pivot Table, and
follow the wizard, and finally drag CPT to the row field and Amt into
the data field.

Hopes this helps.
....
Per

On 2 Mar., 23:24, Carl Schreiner <Carl
wrote:
I'm trying to sort through a long list of medical CPT codes with
corresponding payments. *Is it possible to use the vlookup or other function
to total all the values that correspond to a certain CPT code? *For examle -
I have the following list:

CPT * * Amt
10021 * 223.76
10021 * 240
10021 * 215
10021 * 96.74
10061 * 57.62
10061 * 15.37
11400 * 6
11401 * 49.39
11401 * 105.71
11403 * 63.5
11403 * 116.85

I would like to total all the amounts for the specific CPT code:

CPT * * Amt
10021 *
10021 *
10021 *
10021 * 775.5
10061 *
10061 * 72.99
11400 * 6
11401 *
11401 * 155.1
11403 *
11403 * 180.35

The list has a bout 8000 codes so I'm really looking for something that I
can just scroll down.
Thanks!



Max

can I use vlookup to add multiple values
 
A pivot is ideal. In Layout, drag n drop "CPT" into ROW, "Amt" into DATA (set
to Sum), click to Finish off the wizard. And that's it. The pivot returns the
list of unique CPTs and their corresponding Sum of Amts next to it. Exactly
what you're after, in a matter of seconds (yes, even for 8,000 records).

With the data "as-is", via formulas, think SUMIF ...
In C2, copied down: =SUMIF(A:A,A2,B:B)
Any joy? hit YES below
--
Max
Singapore
---
"Carl Schreiner" wrote:
I'm trying to sort through a long list of medical CPT codes with
corresponding payments. Is it possible to use the vlookup or other function
to total all the values that correspond to a certain CPT code? For examle -
I have the following list:

CPT Amt
10021 223.76
10021 240
10021 215
10021 96.74
10061 57.62
10061 15.37
11400 6
11401 49.39
11401 105.71
11403 63.5
11403 116.85

I would like to total all the amounts for the specific CPT code:

CPT Amt
10021
10021
10021
10021 775.5
10061
10061 72.99
11400 6
11401
11401 155.1
11403
11403 180.35

The list has a bout 8000 codes so I'm really looking for something that I
can just scroll down.
Thanks!







All times are GMT +1. The time now is 10:05 PM.

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