+ Reply to Thread
Results 1 to 11 of 11

how to create formula to divide two rows autoaatically

  1. #1
    TM
    Guest

    how to create formula to divide two rows autoaatically

    Is there any way to setup a sheet or create a formula so that it will divide
    the data in column A by Column B anytime the data is entered and put it into
    columnC ?

    What I am trying to do is create a spreadsheet for calculating fuel MPG. So
    I have columns as miles, gallons and the calculation as MPG.

    What I want to do is anytime a value is entered into miles and gallons, to
    calculate mpg and put it into that respective cell.

    Is there any way I can do this ?
    Thanks
    --
    Tony





  2. #2
    Lern2Ern
    Guest

    RE: how to create formula to divide two rows autoaatically

    Tony, in Column C, type the formula =sum(a1/b1). This should give you the
    result you are looking for.

    Hope this helps

    "TM" wrote:

    > Is there any way to setup a sheet or create a formula so that it will divide
    > the data in column A by Column B anytime the data is entered and put it into
    > columnC ?
    >
    > What I am trying to do is create a spreadsheet for calculating fuel MPG. So
    > I have columns as miles, gallons and the calculation as MPG.
    >
    > What I want to do is anytime a value is entered into miles and gallons, to
    > calculate mpg and put it into that respective cell.
    >
    > Is there any way I can do this ?
    > Thanks
    > --
    > Tony
    >
    >
    >
    >
    >


  3. #3
    TM
    Guest

    Re: how to create formula to divide two rows autoaatically

    That only works for one cell in that particular row.

    I want to be able to enter the miles and gallons in any row and have it
    automatically calculate mpg for that row,

    Here is some sample data:
    Miles Gall MPG
    200 10 20


    That formula works great but there seems to be no way to have it use that
    formula all the way down the sheet for any value entered into miles-column,
    gallons-column and have it calculate mpg

    Can this be done ?
    --
    Tony



    "Lern2Ern" <[email protected]> wrote in message
    news:[email protected]...
    > Tony, in Column C, type the formula =sum(a1/b1). This should give you the
    > result you are looking for.
    >
    > Hope this helps
    >
    > "TM" wrote:
    >
    >> Is there any way to setup a sheet or create a formula so that it will
    >> divide
    >> the data in column A by Column B anytime the data is entered and put it
    >> into
    >> columnC ?
    >>
    >> What I am trying to do is create a spreadsheet for calculating fuel MPG.
    >> So
    >> I have columns as miles, gallons and the calculation as MPG.
    >>
    >> What I want to do is anytime a value is entered into miles and gallons,
    >> to
    >> calculate mpg and put it into that respective cell.
    >>
    >> Is there any way I can do this ?
    >> Thanks
    >> --
    >> Tony
    >>
    >>
    >>
    >>
    >>




  4. #4
    Max
    Guest

    Re: how to create formula to divide two rows autoaatically

    Try copying the formula down from the starting cell, say in C1.

    Drag the fill handle (the black square at the bottom right corner of C1)
    down as far as there is data in cols A and B
    (or you could also just double-click on the fill handle)

    And you could even copy down ahead to cater for expected data in cols A and
    B, if you want.
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "TM" <[email protected]> wrote in message
    news:[email protected]...
    > That only works for one cell in that particular row.
    >
    > I want to be able to enter the miles and gallons in any row and have it
    > automatically calculate mpg for that row,
    >
    > Here is some sample data:
    > Miles Gall MPG
    > 200 10 20
    >
    >
    > That formula works great but there seems to be no way to have it use that
    > formula all the way down the sheet for any value entered into

    miles-column,
    > gallons-column and have it calculate mpg
    >
    > Can this be done ?
    > --
    > Tony




  5. #5
    Lern2Ern
    Guest

    Re: how to create formula to divide two rows autoaatically

    Sure it can. You will need to copy the formula to the other cells in column
    C. Please send me an email at [email protected] and I will send you an
    attachment with the formula populating column C.

    Mary

    "TM" wrote:

    > That only works for one cell in that particular row.
    >
    > I want to be able to enter the miles and gallons in any row and have it
    > automatically calculate mpg for that row,
    >
    > Here is some sample data:
    > Miles Gall MPG
    > 200 10 20
    >
    >
    > That formula works great but there seems to be no way to have it use that
    > formula all the way down the sheet for any value entered into miles-column,
    > gallons-column and have it calculate mpg
    >
    > Can this be done ?
    > --
    > Tony
    >
    >
    >
    > "Lern2Ern" <[email protected]> wrote in message
    > news:[email protected]...
    > > Tony, in Column C, type the formula =sum(a1/b1). This should give you the
    > > result you are looking for.
    > >
    > > Hope this helps
    > >
    > > "TM" wrote:
    > >
    > >> Is there any way to setup a sheet or create a formula so that it will
    > >> divide
    > >> the data in column A by Column B anytime the data is entered and put it
    > >> into
    > >> columnC ?
    > >>
    > >> What I am trying to do is create a spreadsheet for calculating fuel MPG.
    > >> So
    > >> I have columns as miles, gallons and the calculation as MPG.
    > >>
    > >> What I want to do is anytime a value is entered into miles and gallons,
    > >> to
    > >> calculate mpg and put it into that respective cell.
    > >>
    > >> Is there any way I can do this ?
    > >> Thanks
    > >> --
    > >> Tony
    > >>
    > >>
    > >>
    > >>
    > >>

    >
    >
    >


  6. #6
    Ragdyer
    Guest

    Re: how to create formula to divide two rows autoaatically

    Copy the formula down the column, and every time you enter data in Column A
    and Column B, you'll get an instant answer in Column C.

    After you enter the formula
    =A1/B1
    In C1, click in C1 again.

    You'll see a small black square in the lower right corner of this selected
    cell.
    When you hover the cursor over this square, it'll change from a fat white
    cross to a skinny black cross.
    At that point, click and drag the cursor down the column, which is copying
    the formula down Column C.
    You'll notice that the formula changes, as to cell addresses, so that Column
    C will then calculate Column A and Column B on *every* row.

    --
    HTH,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------

    "TM" <[email protected]> wrote in message
    news:[email protected]...
    > That only works for one cell in that particular row.
    >
    > I want to be able to enter the miles and gallons in any row and have it
    > automatically calculate mpg for that row,
    >
    > Here is some sample data:
    > Miles Gall MPG
    > 200 10 20
    >
    >
    > That formula works great but there seems to be no way to have it use that
    > formula all the way down the sheet for any value entered into

    miles-column,
    > gallons-column and have it calculate mpg
    >
    > Can this be done ?
    > --
    > Tony
    >
    >
    >
    > "Lern2Ern" <[email protected]> wrote in message
    > news:[email protected]...
    > > Tony, in Column C, type the formula =sum(a1/b1). This should give you

    the
    > > result you are looking for.
    > >
    > > Hope this helps
    > >
    > > "TM" wrote:
    > >
    > >> Is there any way to setup a sheet or create a formula so that it will
    > >> divide
    > >> the data in column A by Column B anytime the data is entered and put it
    > >> into
    > >> columnC ?
    > >>
    > >> What I am trying to do is create a spreadsheet for calculating fuel

    MPG.
    > >> So
    > >> I have columns as miles, gallons and the calculation as MPG.
    > >>
    > >> What I want to do is anytime a value is entered into miles and gallons,
    > >> to
    > >> calculate mpg and put it into that respective cell.
    > >>
    > >> Is there any way I can do this ?
    > >> Thanks
    > >> --
    > >> Tony
    > >>
    > >>
    > >>
    > >>
    > >>

    >
    >



  7. #7
    Gary's Student
    Guest

    RE: how to create formula to divide two rows autoaatically

    If you fill column C with:

    =IF(B1=0,"",A1/B1)

    and copy this down the entries will "look"automatic. That is, the C cells
    will aprear blank until you enter numbers in column A and B
    --
    Gary's Student


    "TM" wrote:

    > Is there any way to setup a sheet or create a formula so that it will divide
    > the data in column A by Column B anytime the data is entered and put it into
    > columnC ?
    >
    > What I am trying to do is create a spreadsheet for calculating fuel MPG. So
    > I have columns as miles, gallons and the calculation as MPG.
    >
    > What I want to do is anytime a value is entered into miles and gallons, to
    > calculate mpg and put it into that respective cell.
    >
    > Is there any way I can do this ?
    > Thanks
    > --
    > Tony
    >
    >
    >
    >
    >


  8. #8
    TM
    Guest

    Re: how to create formula to divide two rows autoaatically

    That works pretty good if the miles is zero it does not give a divide by
    zero error. But what about if gallons is zero ?

    Can I look to see if both are zero ?
    Thanks

    --
    Tony



    "Gary's Student" <[email protected]> wrote in message
    news:[email protected]...
    > If you fill column C with:
    >
    > =IF(B1=0,"",A1/B1)
    >
    > and copy this down the entries will "look"automatic. That is, the C cells
    > will aprear blank until you enter numbers in column A and B
    > --
    > Gary's Student
    >
    >
    > "TM" wrote:
    >
    >> Is there any way to setup a sheet or create a formula so that it will
    >> divide
    >> the data in column A by Column B anytime the data is entered and put it
    >> into
    >> columnC ?
    >>
    >> What I am trying to do is create a spreadsheet for calculating fuel MPG.
    >> So
    >> I have columns as miles, gallons and the calculation as MPG.
    >>
    >> What I want to do is anytime a value is entered into miles and gallons,
    >> to
    >> calculate mpg and put it into that respective cell.
    >>
    >> Is there any way I can do this ?
    >> Thanks
    >> --
    >> Tony
    >>
    >>
    >>
    >>
    >>




  9. #9
    Max
    Guest

    Re: how to create formula to divide two rows autoaatically

    "TM" wrote:
    ....
    > Can I look to see if both are zero ?


    One way ..

    We could use in the starting cell:
    =IF(OR(A1=0,B1=0),"",A1/B1)

    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  10. #10
    TM
    Guest

    Re: how to create formula to divide two rows autoaatically

    That works like a charm, awesome thanks
    --
    Tony



    "Max" <[email protected]> wrote in message
    news:[email protected]...
    > "TM" wrote:
    > ...
    >> Can I look to see if both are zero ?

    >
    > One way ..
    >
    > We could use in the starting cell:
    > =IF(OR(A1=0,B1=0),"",A1/B1)
    >
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > Singapore, GMT+8
    > xdemechanik
    > http://savefile.com/projects/236895
    > --
    >
    >




  11. #11
    Max
    Guest

    Re: how to create formula to divide two rows autoaatically

    You're welcome !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "TM" <[email protected]> wrote in message
    news:[email protected]...
    > That works like a charm, awesome thanks
    > --
    > Tony




+ 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