+ Reply to Thread
Results 1 to 6 of 6

IF statement returning #VALUE error

  1. #1
    Registered User
    Join Date
    10-16-2013
    Location
    Queensland, Australia
    MS-Off Ver
    MS365, Version 2202
    Posts
    73

    IF statement returning #VALUE error

    Hi guys,

    should hopefully be last request for a little while

    (Benishiryo, if you end up in this thread, you're probably going to recognise a lot of your handiwork)

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Both of these codes return an error. When evaluating the formula, the error occurs with the 'MRC' defined name, or the 'Sheet3!G1:G129' (they contain the exact same data, I was just checking if the defined name was causing the issue)

    It works if I target a single cell, for example

    Please Login or Register  to view this content.
    or make it balls obvious for the formula

    Please Login or Register  to view this content.
    So I think the IF statement doesn't like my range for some reason.

    Please help? my project is almost done, this is the last hurdle! :D

    EDIT:

    In case it wasn't apparent, I want the formula to check the value of E230, and if it matches any values in the range/defined name, I want the cell value to state Mgr. If it doesn't match, I want it to run through the Leave_types list, and if match, duplicate the data from E230 into E231 (where this formula resides). If no MRC and no Leave_Type match, I want it enter the value "free" into the cell E231.
    Last edited by Christopher135; 12-05-2013 at 12:21 AM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: IF statement returning #VALUE error

    Try like this...

    =IF(COUNTIF(Sheet3!G1:G129,E$230),"Mgr",IF(COUNTIF(Leave_Types,E230),E230,"Free"))

    =IF(E$230="MRC","Mgr",IF(COUNTIF(Leave_Types,E230),E230,"Free"))


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    10-16-2013
    Location
    Queensland, Australia
    MS-Off Ver
    MS365, Version 2202
    Posts
    73

    Re: IF statement returning #VALUE error

    I'd be embarressed for not realising that if I wasn't so damned happy it works. thanks mate!

    EDIT:

    spoke to soon. Its not working quite right...

    Please Login or Register  to view this content.
    This is incorrectly changing codes to "Mgr". As in, its checking a code, and its NOT in that range, and its changing it to "Mgr".

    Please Login or Register  to view this content.
    This is incorrectly showing cells as Free, as in, its checkin a code, and it IS in that range, and its not changing it to "Mgr"
    Last edited by Christopher135; 12-05-2013 at 12:43 AM.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: IF statement returning #VALUE error

    Glad it helps you and thanks for the feedback and rep

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  5. #5
    Registered User
    Join Date
    10-16-2013
    Location
    Queensland, Australia
    MS-Off Ver
    MS365, Version 2202
    Posts
    73

    Re: IF statement returning #VALUE error

    Quote Originally Posted by :) Sixthsense :) View Post
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    I was a little pre-emptive in changing this thread to solved. I thought it had worked but I was wrong!

  6. #6
    Registered User
    Join Date
    10-16-2013
    Location
    Queensland, Australia
    MS-Off Ver
    MS365, Version 2202
    Posts
    73

    Re: IF statement returning #VALUE error

    Fixed!

    Please Login or Register  to view this content.
    That'll do the trick!

+ 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. IF OR statement returning #VALUE! error?
    By Sonny Crockett in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-17-2013, 08:57 AM
  2. Value Returning as S in If/AND Statement for all Cells
    By jcarruth in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-25-2013, 06:46 PM
  3. IF Statement returning 0
    By buyshirts in forum Excel General
    Replies: 4
    Last Post: 07-16-2012, 09:03 AM
  4. If And Statement returning #VALUE
    By AESP920 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-26-2010, 03:22 PM
  5. if statement returning blanks
    By Mayrie in forum Excel General
    Replies: 3
    Last Post: 09-29-2009, 03:59 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