PDA

View Full Version : Total values associated with unique value in adjacent column



ron
09-25-2012, 12:11 PM
Some assistance please.

Column A: list of string values with duplicates and can contain blanks.
Column B: a numeric value associated with the adjacent cell in Column A

Using VBA I want the unique values from Column A entered in Column C and the total of the values from Column B entered in Column D aligned with the associated value in Column C.


Thanks
ron

gervie
09-25-2012, 08:51 PM
Hi,

I have any questions for you.
1/ What values in column B associated with blank cells in column A? For example, if A3 is blank, what value B3 contains?
2/ If A6 and A9 are the same values. B6 and B9 are the same values, aren't they?

ron
09-26-2012, 09:04 AM
If Column A is blank Column B would also be blank
Sample data:

A1= Blue
A2= Red
A3= Blue
A4= is blank
A5= Green

B1= 2
B2 = 4
B3 = 1
B4 = is blank
B5 = 5

The Solution:

C1 = Blue
C2= Red
C3 = Green

D1= 3
D2= 4
D3= 5

mohanvijay
09-26-2012, 07:58 PM
Try Pivot Table

ron
10-01-2012, 02:06 PM
Thanks for the pivot table suggestion. That would work but this will be a small part of a larger vba procedure.

mohanvijay
10-04-2012, 11:38 PM
then try pivot table at run time