+ Reply to Thread
Results 1 to 3 of 3

countif problem...

  1. #1
    Scot B
    Guest

    countif problem...

    Greetings,

    I'm having trouble getting a formula to work..I can't seem to think of it in
    a straightforward manner. it shouldn't be hard.

    your help is appreciated....

    i have a row of values....RowA
    let's say they're 100,125,60,150,200.

    in a different cell, B1i have a value which indicates the number of values
    in row A to be counted. let's say the value in B1 is "3"

    so, i'm trying to derive a formula that says "sum X of the numbers in row A,
    where X is defined by the value in cell B1".

    then a formula that looks to B2 and picks up summing the values in Row A,
    where the first formula left of for X number of cells defined by B2.

    Please help!

    Cheers,

    Scot B.



  2. #2
    Bob Phillips
    Guest

    Re: countif problem...

    First one

    =SUM(OFFSET($A$1,0,0,B1,1))

    Second one

    =SUM(OFFSET($A$1,B1,0,B2,1))

    and copy the second down.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Scot B" <[email protected]> wrote in message
    news:[email protected]...
    > Greetings,
    >
    > I'm having trouble getting a formula to work..I can't seem to think of it

    in
    > a straightforward manner. it shouldn't be hard.
    >
    > your help is appreciated....
    >
    > i have a row of values....RowA
    > let's say they're 100,125,60,150,200.
    >
    > in a different cell, B1i have a value which indicates the number of values
    > in row A to be counted. let's say the value in B1 is "3"
    >
    > so, i'm trying to derive a formula that says "sum X of the numbers in row

    A,
    > where X is defined by the value in cell B1".
    >
    > then a formula that looks to B2 and picks up summing the values in Row A,
    > where the first formula left of for X number of cells defined by B2.
    >
    > Please help!
    >
    > Cheers,
    >
    > Scot B.
    >
    >




  3. #3
    JE McGimpsey
    Guest

    Re: countif problem...

    If I understand you correctly (I'm assuming that A and B are columns,
    not rows, for one thing...):

    C1: =SUM(OFFSET(A1,,,B1,1))
    C2: =SUM(OFFSET(A$1,SUM(B$1:B1),,B2,1))

    In article <[email protected]>,
    "Scot B" <[email protected]> wrote:

    > Greetings,
    >
    > I'm having trouble getting a formula to work..I can't seem to think of it in
    > a straightforward manner. it shouldn't be hard.
    >
    > your help is appreciated....
    >
    > i have a row of values....RowA
    > let's say they're 100,125,60,150,200.
    >
    > in a different cell, B1i have a value which indicates the number of values
    > in row A to be counted. let's say the value in B1 is "3"
    >
    > so, i'm trying to derive a formula that says "sum X of the numbers in row A,
    > where X is defined by the value in cell B1".
    >
    > then a formula that looks to B2 and picks up summing the values in Row A,
    > where the first formula left of for X number of cells defined by B2.
    >
    > Please help!
    >
    > Cheers,
    >
    > Scot B.


+ 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