+ Reply to Thread
Results 1 to 6 of 6

add column x values until column y equals

Hybrid View

Guest add column x values until... 01-09-2007, 12:08 AM
Bryan Hessey Hi, with helper columns? -... 01-09-2007, 02:13 AM
Guest not quite!, but good idea,... 01-09-2007, 02:38 AM
Bryan Hessey Hi, If the '1' in D is the... 01-09-2007, 05:44 AM
Guest you're a star!!! 01-10-2007, 01:54 AM
Bryan Hessey it slows me down a little... 01-10-2007, 01:58 AM
  1. #1
    bleugh
    Guest

    add column x values until column y equals

    I'm trying to figure out how to make excel sum the values in column J while column D=0

    I've attached an example sheet

    basically, if column D = 1 and the below cell D+1 is NOT 0, then it's a unique row, and the value in J is the sum

    if column D = 0 then it's a 'duplicate' value, then I need to sum the values until column D = 1 again


    i tried to describe it with a simple math formula, but have no luck, see the attached sheet, the 'borders' show the cells being added

    been at this for a couple of days now :-(
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by bleugh
    I'm trying to figure out how to make excel sum the values in column J while column D=0

    I've attached an example sheet

    basically, if column D = 1 and the below cell D+1 is NOT 0, then it's a unique row, and the value in J is the sum

    if column D = 0 then it's a 'duplicate' value, then I need to sum the values until column D = 1 again


    i tried to describe it with a simple math formula, but have no luck, see the attached sheet, the 'borders' show the cells being added

    been at this for a couple of days now :-(
    Hi,

    with helper columns? - should D15 be =1 ?

    hth
    ---
    Attached Files Attached Files
    Si fractum non sit, noli id reficere.

  3. #3
    bleugh
    Guest

    not quite!, but good idea, helper cells or macros, i don't mind

    D15 is a value that is resultant from some text checkings from a big list,

    those 1 and 0 values are fixed and simply represent a unique value,

    a 1 with a string of zeros represents values to be added, from the text being checked it was the easiest way to parse them down.

    your method don't like a long string of zeros, basically, column n in your sheet should = the manually added up column L, the last couple of totals don't for some reason.

    i'm having a play now, you've put me on the right track though it seems

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by bleugh
    D15 is a value that is resultant from some text checkings from a big list,

    those 1 and 0 values are fixed and simply represent a unique value,

    a 1 with a string of zeros represents values to be added, from the text being checked it was the easiest way to parse them down.

    your method don't like a long string of zeros, basically, column n in your sheet should = the manually added up column L, the last couple of totals don't for some reason.

    i'm having a play now, you've put me on the right track though it seems
    Hi,

    If the '1' in D is the determining factor, then

    =IF(D4=1,J4,J4+K3)

    should work for column K accumulation, remove column M, and then N should be ok

    hth
    ---

  5. #5
    bleugh
    Guest

    Wink you're a star!!!

    fantastic, thanks for that

    being an electronics engineer, i can never get my head around the way excel does logic..........oh, being thick don't help either ;-)

  6. #6
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by bleugh
    fantastic, thanks for that

    being an electronics engineer, i can never get my head around the way excel does logic..........oh, being thick don't help either ;-)
    it slows me down a little too,

    but good to see that it worked for you, and thanks for the response.
    --

+ 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