+ Reply to Thread
Results 1 to 6 of 6

Nested IF AND SEARCH formula not working

  1. #1
    Registered User
    Join Date
    05-31-2013
    Location
    Washington DC
    MS-Off Ver
    Excel 2010
    Posts
    30

    Question Nested IF AND SEARCH formula not working

    So I'm not really sure why this formulas not working. The first part with the FYRef column works fine, but then the

    =IF(ISNUMBER([FYRef]),[FYRef], IF(AND([RECEIVEDDATE]>=DATE(2010, 4, 1), (MID([SERIAL],5,2) = "11")), 2011, IF(AND(SEARCH("-11",[SERIAL],0), [RECEIVEDDATE]>=DATE(2010, 04, 01), 2011, 2010))))

    Any help would be greatly appreciated.
    I believe it's an issue with the SEARCH function.

    Thanks,

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Nested IF AND SEARCH formula not working

    i take it this is a table?
    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    05-31-2013
    Location
    Washington DC
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Nested IF AND SEARCH formula not working

    I guess this is my real questions, because this is the part of the formula that's not working and just returns "#VALUE!".
    Why did this work in PowerPivot, but now that I'm using it on a standard excel sheet not work?

    =IF(SEARCH("-11-", [SERIAL],0),2011, 2010)

    Thanks,

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Nested IF AND SEARCH formula not working

    Are you searching the text string from the beginning, left to right? If so, replace your SEARCH start_num argument with 1. So, making it:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-31-2013
    Location
    Washington DC
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Nested IF AND SEARCH formula not working

    That still produces the same error.
    a formula like this would work...
    =IF(ISERROR(FIND("-11-",[SERIAL],1)),"2010","2011")

    But once the ISERROR starts getting combined with other ISERRORs they get harder to read and edit going back later. Is this the only way?

  6. #6
    Registered User
    Join Date
    05-31-2013
    Location
    Washington DC
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Nested IF AND SEARCH formula not working

    Solved!

    =if(isnumber(find("-11-",[serial])),"2011", "2010")

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Nested IF AND SEARCH formula not working

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Nested IF formula partially not working
    By Mattacola in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-14-2012, 03:21 PM
  2. [SOLVED] If-Then nested formula not working...must be a syntax error
    By sunny_island2002 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-16-2012, 02:37 PM
  3. Nested SEARCH or FIND formula query
    By SAsplin in forum Excel General
    Replies: 7
    Last Post: 07-15-2011, 06:00 AM
  4. Excel 2007 : Nested Search Formula
    By Broken85 in forum Excel General
    Replies: 6
    Last Post: 02-07-2011, 01:32 PM
  5. Replies: 2
    Last Post: 01-11-2010, 07:37 AM

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