+ Reply to Thread
Results 1 to 5 of 5

Summing of Matching Values for condition

  1. #1
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Summing of Matching Values for condition

    Hi all,

    I need some assistance on coming up with a VBA Code to sum conditional matching variable values.

    On Sheet 1, I have numerical values in column A
    On Sheet2, I have the same numerical values listed in column A
    and for some rows I have some numerical values from column A in column T.

    On Sheet 1, I have integer values in column X.
    For the corresponding numerical values found on Sheet2 (column A&T) that match the values in column A of Sheet two I need to sum the two integer values found in column X into column Y of Sheet 1.
    This will happen if column U of Sheet 1 contains a specific value.
    For instance if value "W" is in column U.

    Here's an example workbook of values and the resultant found that should found in column Y of sheet1.

    If anyone help w/ a basic code structure, then I think I'll be able to substitute into my real workbook.

    Thanks,

    BDB
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Summing of Matching Values for condition

    Hmm... in *theory* you can do this with formulae assuming the values listed in Col A on sheet 1 do not appear within range B:S on Sheet2 ? eg:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Summing of Matching Values for condition

    A formula would not be a good option as I will always have a few thousand rows of data. Plus my values are all variables on sheet1.

  4. #4
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Summing of Matching Values for condition

    Any chance of some help on this?

  5. #5
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Summing of Matching Values for condition

    I've decided it maybe easier (for me at least) to bring all the values to a "working_page" before outputting the actual value I need.
    I've put together the following code. However, I'm not sure if the last bit is summing the values that I need summed. The part of code in question is in red. It should sum the values for I in columns R & U.The output should be to column AC on the same sheet "Working_Non_Completed"). I'm getting some values which I have yet to figure out where they're coming from. Can anyone look at the code and please tell me?

    Please Login or Register  to view this content.
    Thanks for any help I can get.

    BDB

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1