+ Reply to Thread
Results 1 to 6 of 6

If

  1. #1
    Registered User
    Join Date
    11-07-2009
    Location
    Yorkshire
    MS-Off Ver
    Excel 2003
    Posts
    3

    If

    I am trying to use IF and a logic test to give a different multiplyer to calculate gas prices on a spreadsheet.
    The gas price alters when set amount of KWh have been consumed.
    The logic test box etc is displayed on the attached sheet but only the True value ie less that 100 is being used for all rows, even the rows where the argument is false.
    Where am I making the error?
    Attached Files Attached Files
    Last edited by Brighouse Jim; 11-07-2009 at 04:52 PM. Reason: Typos

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: IF problem

    You need to SUM the range (H$10:H34).

    On an aside... Brighouse... I think I've been to a car auction there... inane fact but there you go !

  3. #3
    Registered User
    Join Date
    11-06-2009
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: IF problem

    I am not seeing where your argument is false? all your values in column H are under 100 so it will always choose the >100 option. Currently your gas price is independant of your KWh values.

    *Edit* Ahh, I see what you are referring to now, DonkeyOte is correct. In your current If statement
    Please Login or Register  to view this content.
    $H$10:H10 must be summed so replace it with
    Please Login or Register  to view this content.
    Note: you may also want to remove the $$ from H34 in your formula, you'll see when you use it unless that really was your intention.
    Last edited by Brane Ded; 11-07-2009 at 05:03 PM.

  4. #4
    Registered User
    Join Date
    11-07-2009
    Location
    Yorkshire
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: If

    Hi Guys
    Thanks for the help.
    I am now using the Sum option which I now realise was my error, but the "false " calculation is not shown on my sheet, ony the true value.
    It should be from rows 19 down to 34 using the cheaper gas cost for over 100 but its not.
    Any thoughts
    THanks

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: If

    If you read through Brane Ded's post they allude to issue of absolute references being used in the FALSE calculation.

    Perhaps simplest to use

    J10: =$H10*IF(SUM($H$10:H10)<100,$O$12,$O$13)
    and copy down to J34

  6. #6
    Registered User
    Join Date
    11-07-2009
    Location
    Yorkshire
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: If

    Thanks DonkeyOte
    Your message neary solved the problem, but I needed to delete the $ after the = to make it work-thanks again
    Brighouse Jim

+ 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