+ Reply to Thread
Results 1 to 4 of 4

Help on SUMIF

  1. #1
    timotee
    Guest

    Help on SUMIF

    working cells A31,B31,B32,B33. If B31>A31,then B32 is (A31-B31)*8. If
    B31<A31, then B32 is (9999-A31)+B31*8.

    I'm tryin to clock a electric meter that rolls around every 9999 units.
    After 9999, it starts on 1 again. I have other cells to covert data to money,
    but listing that right now would make things too complicated.

    My formula for B32 is =IF(B31>A31,"SUM(B31-A31)*8","=SUM(9999-A31)+B31*8").

    I can't get my orginal thought to pan out. On cell B33, I multiply B32 value
    by .01057 to convert to dollars.

    If you go from 9999 to 50, the difference is 9940. The real billing units
    are 51, because the meter ends at 10000.

    Any help greatly appreciated.

  2. #2
    Gary''s Student
    Guest

    RE: Help on SUMIF

    Instead of
    (9999-A31)+B31*8
    try
    ((9999-A31)+B31*)8
    --
    Gary's Student


    "timotee" wrote:

    > working cells A31,B31,B32,B33. If B31>A31,then B32 is (A31-B31)*8. If
    > B31<A31, then B32 is (9999-A31)+B31*8.
    >
    > I'm tryin to clock a electric meter that rolls around every 9999 units.
    > After 9999, it starts on 1 again. I have other cells to covert data to money,
    > but listing that right now would make things too complicated.
    >
    > My formula for B32 is =IF(B31>A31,"SUM(B31-A31)*8","=SUM(9999-A31)+B31*8").
    >
    > I can't get my orginal thought to pan out. On cell B33, I multiply B32 value
    > by .01057 to convert to dollars.
    >
    > If you go from 9999 to 50, the difference is 9940. The real billing units
    > are 51, because the meter ends at 10000.
    >
    > Any help greatly appreciated.
    >


  3. #3
    Roger Govier
    Guest

    Re: Help on SUMIF

    Hi

    You were almost there. You don't need quotes around your formulae, but
    you do need an extra set of brackets.
    Try
    =IF(B31>A31,(B31-A31)*8,((10000-A31)+B31)*8)
    I think you need to use 10,000 and not 9999 as I am sure you would get
    charged for the unit used from 9999 to 10000.

    --
    Regards

    Roger Govier


    "timotee" <[email protected]> wrote in message
    news:[email protected]...
    > working cells A31,B31,B32,B33. If B31>A31,then B32 is (A31-B31)*8. If
    > B31<A31, then B32 is (9999-A31)+B31*8.
    >
    > I'm tryin to clock a electric meter that rolls around every 9999
    > units.
    > After 9999, it starts on 1 again. I have other cells to covert data to
    > money,
    > but listing that right now would make things too complicated.
    >
    > My formula for B32 is
    > =IF(B31>A31,"SUM(B31-A31)*8","=SUM(9999-A31)+B31*8").
    >
    > I can't get my orginal thought to pan out. On cell B33, I multiply B32
    > value
    > by .01057 to convert to dollars.
    >
    > If you go from 9999 to 50, the difference is 9940. The real billing
    > units
    > are 51, because the meter ends at 10000.
    >
    > Any help greatly appreciated.




  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    I think this would be easier...

    =(B31-A31+(A31>B31)*10000)*8

    If you also want to include your dollars calculation

    =(B31-A31+(A31>B31)*10000)*8*0.01057

+ 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