+ Reply to Thread
Results 1 to 4 of 4

Need to bypass #value error for search function

  1. #1
    Registered User
    Join Date
    01-14-2022
    Location
    calgary
    MS-Off Ver
    2111
    Posts
    1

    Need to bypass #value error for search function

    Hello everyone. So I'm new to excel and have been trying to teach myself how to use it to its full potential with moderate progress. However I've encountered a problem that ive been unable to solve myself despite much trial and error. So im getting the VALUE error trying to use the search function due to the cell being searched has a drop down with various listings. All the listings can be divided into 2 categories, ASME and CSA, that im trying to make work with the search function in a formula from another cell. Here it is.

    =IF(AND(SEARCH("ASME",AS3),Q8<=6,Q8>0),"1.5 ",IF(AND(SEARCH("ASME",AS3),Q8>6,Q8<=13),"3",IF(AND(SEARCH("ASME",AS3),Q8>13,Q8<=25),"4",IF(AND(SEARCH("ASME",AS3),Q8>25),"5 ",IF(AND(SEARCH("CSA",AS3),Q8<=10,Q8>0),"2.5 ",IF(AND(SEARCH("CSA",AS3),Q8>10),"3.5 ",""))))))


    So it functions fine if i stick to any ASME codes on the drop down cell, AS3, however if i switch to a CSA code I get the VALUE error. I understand why im getting it as it cant find ASME on any of the CSA code listings. My question is how do i get it to search for CSA without getting hung up on not finding ASME and without combining the key words in the same search function as it would diminish the whole point of switching between the two codes in the first place. Any help would be greatly appreciated. Thanks for your time.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,418

    Re: Need to bypass #value error for search function

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.

    Administrative Note:

    Members will tailor the solutions they offer to the version of Office (Excel) that you have. Please check that your forum profile is up-to-date in this respect. 2111 is a release number, not a version per se. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Need to bypass #value error for search function

    Hi & welcome to the board.
    You can wrap the search function in isnumber like
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Need to bypass #value error for search function

    Try

    =IF(ISNUMBER(SEARCH("ASME",AS3)),IF(Q8<=6,1.5,IF(Q8<=13,3,IF(Q8<=25,4,5))),IF(ISNUMBER(SEARCH("CSA",AS3)),IF(Q8<=10,2.5,3.5),""))
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. The compiler bypass some value, when tring to use find function
    By Tester C in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-29-2019, 12:55 PM
  2. [SOLVED] Bypass this error message
    By IonutC in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2019, 08:02 AM
  3. [SOLVED] How to bypass the 3 conditional formatting limit by using the IF or OR function?
    By g0dmenuelz in forum Excel - New Users/Basics
    Replies: 13
    Last Post: 03-05-2019, 11:01 AM
  4. Bypass missing reference VBA error
    By lamarao in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 11-10-2018, 02:45 AM
  5. Cannot Bypass Error 619 [executing SAP from VBA]
    By VinchinzoB in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-19-2018, 08:27 AM
  6. Can't Bypass error Copy area and CopyPaste are not the same
    By lougs7 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-09-2015, 09:48 PM
  7. Bypass the run time error if user enters a wrong value
    By Richard Flame in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2007, 11:26 AM

Tags for this Thread

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