+ Reply to Thread
Results 1 to 7 of 7

VALUE Error

  1. #1
    Registered User
    Join Date
    08-17-2022
    Location
    Vermont, USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    9

    VALUE Error

    I am getting a VLAUE error in cell F17 with a new formula I am trying and I can't find where the error is. Can you see it? The sheet is attached.

    This is the raw formula
    =IF(F15<(0.5*$J$3),(($J$3*0.25)-F14),IF(F15<(0.75*$J$3),(($J$3*0.25)-F14)+F16)),IF(F15>(0.25*$J$3),0)
    Attached Files Attached Files

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: VALUE Error

    (($J$3*0.25)-F14)+F16))

    and no false or ) ending
    =IF(F15<(0.5*$J$3),(($J$3*0.25)-F14),IF(F15<(0.75*$J$3),((($J$3*0.25)-F14)+F16),IF(F15>(0.25*$J$3),0,"what to do if false")))

    updated the sample - quite complicated - so did not look closely to be honest, added formula above - removes the error
    Attached Files Attached Files
    Last edited by etaf; 08-24-2022 at 03:50 PM.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    08-17-2022
    Location
    Vermont, USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    9

    Re: VALUE Error

    Thank you for your help. If you would be willing to take another look, I am curious how to make this embedded IF statement work. Conversationally, here is what I want it to do:
    If the value of f15 is less than 50% of J3, "do this"
    If the value is less than 75% of J3 (but more than 50%), "do this"
    If the value of f15 is equal to or more than 75% of J3, then the answer is 0

    I thought I had the structure right, but you are suggesting that I have an additional statement at the end and I am not sure what that would be.

  4. #4
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: VALUE Error

    Hi stephcohen,

    Does this work for you?

    =IF(F15<(0.5*$J$3),(($J$3*0.25)-F14),IF(F15<(0.75*$J$3),(($J$3*0.25)-F14)+F16,IF(F15>=(0.75*$J$3),0,"")))

    For info - Your second IF statement didn't have a 'value if false'. I corrected your last IF statement to be >= as per your instruction above and adjusted the value to 0.75 rather than 0.25 (As etaf points out though, the final IF criteria isn't really necessary as it will become the default option if the criteria for the other IF statements aren't met). You didn't have a 'value if false' specified for your final criteria so I've input blank (""). Also, as a quick visual check and tip, your formula contained three IF statements so I would have expected it to end with three closed brackets (yours had one).

    Hope this helps,

    Snook
    Last edited by The_Snook; 08-24-2022 at 05:43 PM.

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: VALUE Error

    =IF(F15<(0.5*$J$3),(($J$3*0.25)-F14),IF(F15<(0.75*$J$3),((($J$3*0.25)-F14)+F16),IF(F15>(0.25*$J$3),0,"what to do if false")))

    if its less than 50% - TRUE , then IF less than 75% - TRUE - so now it must be more than 75%, as no other option - so you dont need the extra IF
    so taking that info and using the IF

    =IF(F15<(0.5*$J$3),(($J$3*0.25)-F14),IF(F15<(0.75*$J$3),((($J$3*0.25)-F14)+F16),0))

    But you seem to be taking > 0.25% , so that maybe a typo, but as mentioned its not needed , as if its NOT < 50 or <75 - then it must be greater than 75
    Possible a blank cell - which will be seen as zero

    =IF( F15="", "", IF(F15<(0.5*$J$3),(($J$3*0.25)-F14),IF(F15<(0.75*$J$3),((($J$3*0.25)-F14)+F16),0)))
    ignores blank cells
    Attached Files Attached Files
    Last edited by etaf; 08-24-2022 at 04:09 PM.

  6. #6
    Registered User
    Join Date
    08-17-2022
    Location
    Vermont, USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    9

    Re: VALUE Error

    You did it! Thank you! It was impossible for me to see. Thank you.

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: VALUE Error

    you are welcome

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Odd Error Handling Behaviour; goes to error handler even when no error?
    By kalikj in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-04-2018, 10:04 AM
  2. [SOLVED] Run-tim error -2147467259(80004005): Automation error Unspecidied error
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2014, 12:12 PM
  3. Excel macro (compile error. syntax error.) error
    By salar_younis in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2014, 06:11 AM
  4. Receiving following error “Complie error : syntax error” Help
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2012, 10:19 AM
  5. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  6. Error 75 File/Path access error, sometimes Error 1004
    By smokebreak in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-16-2011, 02:35 PM
  7. [SOLVED] Error Handling - On Error GoTo doesn't trap error successfully
    By David in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2006, 02:10 PM

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