Consulting

Results 1 to 6 of 6

Thread: Total values associated with unique value in adjacent column

  1. #1
    VBAX Regular
    Joined
    Nov 2004
    Posts
    27
    Location

    Total values associated with unique value in adjacent column

    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

  2. #2
    VBAX Newbie
    Joined
    Oct 2011
    Posts
    1
    Location
    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?

  3. #3
    VBAX Regular
    Joined
    Nov 2004
    Posts
    27
    Location
    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

  4. #4
    VBAX Tutor mohanvijay's Avatar
    Joined
    Aug 2010
    Location
    MADURAI
    Posts
    268
    Location
    Try Pivot Table

  5. #5
    VBAX Regular
    Joined
    Nov 2004
    Posts
    27
    Location
    Thanks for the pivot table suggestion. That would work but this will be a small part of a larger vba procedure.

  6. #6
    VBAX Tutor mohanvijay's Avatar
    Joined
    Aug 2010
    Location
    MADURAI
    Posts
    268
    Location
    then try pivot table at run time

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •