+ Reply to Thread
Results 1 to 19 of 19

Summing a variable range of columns

Hybrid View

  1. #1
    Richard Buttrey
    Guest

    Re: Summing a variable range of columns

    On Thu, 28 Jul 2005 10:20:24 +0100, "Roger Govier"
    <roger@technologyNOSPAM4u.co.uk> wrote:

    >In cell C1
    >=SUM(INDIRECT("B1:B"&A1)
    >copy down through C2:C3



    Roger,

    Thanks for the quick repsonse. I apologise for sewing some confusion.

    I should have said that I want the results in K1:K3 and that it is
    Cells B1, C1, D1, E1 etc, which have the values 1, 2, 3, 4.. etc
    respectively. i.e. I'm adding a variable range of either 3, 6 or 9
    cells depending on the value in A

    I also need an additional formula which adds the first, fourth or
    seventh cells depending on the value in A.

    i.e. given the earlier data.

    In say L1 (where A1= 6) I need to add B1 and E1 = 5
    In say L2 (where A1= 3) I just need B1 = 1
    In say L3 (where A1= 9) I need to add B1 and E1 and H1= 12

    Any ideas / suggestion gratefully received.

    Regards

    __
    Richard Buttrey
    Grappenhall, Cheshire, UK
    __________________________

  2. #2
    Roger Govier
    Guest

    Re: Summing a variable range of columns

    Richard
    It wasn't you causing confusion, it was me misreading.
    In cell K1
    =SUM(B1:OFFSET(B1,0,A1-1))
    and copy down


    --
    Regards
    Roger Govier
    "Richard Buttrey" <chaos.theory.nospam.removethis@zen.co.uk> wrote in
    message news:ohahe15v07ierj1mech47gugdg8mavvt30@4ax.com...
    > On Thu, 28 Jul 2005 10:20:24 +0100, "Roger Govier"
    > <roger@technologyNOSPAM4u.co.uk> wrote:
    >
    >>In cell C1
    >>=SUM(INDIRECT("B1:B"&A1)
    >>copy down through C2:C3

    >
    >
    > Roger,
    >
    > Thanks for the quick repsonse. I apologise for sewing some confusion.
    >
    > I should have said that I want the results in K1:K3 and that it is
    > Cells B1, C1, D1, E1 etc, which have the values 1, 2, 3, 4.. etc
    > respectively. i.e. I'm adding a variable range of either 3, 6 or 9
    > cells depending on the value in A
    >
    > I also need an additional formula which adds the first, fourth or
    > seventh cells depending on the value in A.
    >
    > i.e. given the earlier data.
    >
    > In say L1 (where A1= 6) I need to add B1 and E1 = 5
    > In say L2 (where A1= 3) I just need B1 = 1
    > In say L3 (where A1= 9) I need to add B1 and E1 and H1= 12
    >
    > Any ideas / suggestion gratefully received.
    >
    > Regards
    >
    > __
    > Richard Buttrey
    > Grappenhall, Cheshire, UK
    > __________________________




  3. #3
    Roger Govier
    Guest

    Re: Summing a variable range of columns

    Richard
    It wasn't you causing confusion, it was me misreading.
    In cell K1
    =SUM(B1:OFFSET(B1,0,A1-1))
    and copy down


    --
    Regards
    Roger Govier
    "Richard Buttrey" <chaos.theory.nospam.removethis@zen.co.uk> wrote in
    message news:ohahe15v07ierj1mech47gugdg8mavvt30@4ax.com...
    > On Thu, 28 Jul 2005 10:20:24 +0100, "Roger Govier"
    > <roger@technologyNOSPAM4u.co.uk> wrote:
    >
    >>In cell C1
    >>=SUM(INDIRECT("B1:B"&A1)
    >>copy down through C2:C3

    >
    >
    > Roger,
    >
    > Thanks for the quick repsonse. I apologise for sewing some confusion.
    >
    > I should have said that I want the results in K1:K3 and that it is
    > Cells B1, C1, D1, E1 etc, which have the values 1, 2, 3, 4.. etc
    > respectively. i.e. I'm adding a variable range of either 3, 6 or 9
    > cells depending on the value in A
    >
    > I also need an additional formula which adds the first, fourth or
    > seventh cells depending on the value in A.
    >
    > i.e. given the earlier data.
    >
    > In say L1 (where A1= 6) I need to add B1 and E1 = 5
    > In say L2 (where A1= 3) I just need B1 = 1
    > In say L3 (where A1= 9) I need to add B1 and E1 and H1= 12
    >
    > Any ideas / suggestion gratefully received.
    >
    > Regards
    >
    > __
    > Richard Buttrey
    > Grappenhall, Cheshire, UK
    > __________________________




  4. #4
    Richard Buttrey
    Guest

    Re: Summing a variable range of columns

    Roger,

    Brilliant. Thanks.

    Sorry to be a pest but do you have any thoughts on the second example,
    where I want to sum either the 1st, 1st & 4th or 1st, 4th & 7th
    columns in the B:J range depending on the A value


    TIA


    On Thu, 28 Jul 2005 11:50:08 +0100, "Roger Govier"
    <roger@technologyNOSPAM4u.co.uk> wrote:

    >Richard
    >It wasn't you causing confusion, it was me misreading.
    >In cell K1
    >=SUM(B1:OFFSET(B1,0,A1-1))
    >and copy down


    __
    Richard Buttrey
    Grappenhall, Cheshire, UK
    __________________________

  5. #5
    Richard Buttrey
    Guest

    Re: Summing a variable range of columns

    Roger,

    Brilliant. Thanks.

    Sorry to be a pest but do you have any thoughts on the second example,
    where I want to sum either the 1st, 1st & 4th or 1st, 4th & 7th
    columns in the B:J range depending on the A value


    TIA


    On Thu, 28 Jul 2005 11:50:08 +0100, "Roger Govier"
    <roger@technologyNOSPAM4u.co.uk> wrote:

    >Richard
    >It wasn't you causing confusion, it was me misreading.
    >In cell K1
    >=SUM(B1:OFFSET(B1,0,A1-1))
    >and copy down


    __
    Richard Buttrey
    Grappenhall, Cheshire, UK
    __________________________

  6. #6
    Roger Govier
    Guest

    Re: Summing a variable range of columns

    Richard
    In L1
    =CHOOSE(--SUM(A1>=7,A1>=4)+1,B1,(B1+E1),(B1+E1+H1))
    copy down

    --
    Regards
    Roger Govier
    "Richard Buttrey" <chaos.theory.nospam.removethis@zen.co.uk> wrote in
    message news:pbihe1l293sn7r6koh3vlv45f4k5r8sm69@4ax.com...
    > Roger,
    >
    > Brilliant. Thanks.
    >
    > Sorry to be a pest but do you have any thoughts on the second example,
    > where I want to sum either the 1st, 1st & 4th or 1st, 4th & 7th
    > columns in the B:J range depending on the A value
    >
    >
    > TIA
    >
    >
    > On Thu, 28 Jul 2005 11:50:08 +0100, "Roger Govier"
    > <roger@technologyNOSPAM4u.co.uk> wrote:
    >
    >>Richard
    >>It wasn't you causing confusion, it was me misreading.
    >>In cell K1
    >>=SUM(B1:OFFSET(B1,0,A1-1))
    >>and copy down

    >
    > __
    > Richard Buttrey
    > Grappenhall, Cheshire, UK
    > __________________________




  7. #7
    Roger Govier
    Guest

    Re: Summing a variable range of columns

    Richard
    In L1
    =CHOOSE(--SUM(A1>=7,A1>=4)+1,B1,(B1+E1),(B1+E1+H1))
    copy down

    --
    Regards
    Roger Govier
    "Richard Buttrey" <chaos.theory.nospam.removethis@zen.co.uk> wrote in
    message news:pbihe1l293sn7r6koh3vlv45f4k5r8sm69@4ax.com...
    > Roger,
    >
    > Brilliant. Thanks.
    >
    > Sorry to be a pest but do you have any thoughts on the second example,
    > where I want to sum either the 1st, 1st & 4th or 1st, 4th & 7th
    > columns in the B:J range depending on the A value
    >
    >
    > TIA
    >
    >
    > On Thu, 28 Jul 2005 11:50:08 +0100, "Roger Govier"
    > <roger@technologyNOSPAM4u.co.uk> wrote:
    >
    >>Richard
    >>It wasn't you causing confusion, it was me misreading.
    >>In cell K1
    >>=SUM(B1:OFFSET(B1,0,A1-1))
    >>and copy down

    >
    > __
    > Richard Buttrey
    > Grappenhall, Cheshire, UK
    > __________________________




+ 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