+ Reply to Thread
Results 1 to 3 of 3

"IF" and "SEARCH" - not able to get the else part of the logic to show value

  1. #1
    Registered User
    Join Date
    05-08-2017
    Location
    Toronto
    MS-Off Ver
    MS365 Version 2404
    Posts
    87

    Question "IF" and "SEARCH" - not able to get the else part of the logic to show value

    Hi all,

    Simple issue - I'm using the following formula:

    =IF(SEARCH($A$1,B1), 1,0)

    to check if a cell contains a specific string called "[OPEN]", and if so, mark an adjacent cell as 1, else 0. I'm also anchoring the cell that contains the text to search [OPEN] so I don't have copy this down for all cells in the column. I'm able to get the 1 to show for cases where the cell contains [OPEN], but get #VALUE! for those cells which don't. Is there anything I can do to fix this?

    I've attached a workbook.

    Thanks.
    Attached Files Attached Files
    Last edited by noname91; 02-28-2023 at 01:24 PM.

  2. #2
    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
    31,182

    Re: "IF" and "SEARCH" - not able to get the else part of the logic to show value

    Try

    =IFERROR(IF(SEARCH($A$1,B2), 1,0),0)
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    05-08-2017
    Location
    Toronto
    MS-Off Ver
    MS365 Version 2404
    Posts
    87

    Re: "IF" and "SEARCH" - not able to get the else part of the logic to show value

    Thanks JohnTopley! Works nicely.

+ 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. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  2. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  3. If "6343" in cell A3 matches "monthly" in B3 show a "Y" in C3
    By laaxy in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 04-05-2014, 07:38 PM
  4. Replies: 3
    Last Post: 01-02-2014, 02:15 PM
  5. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  6. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  7. Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" not working
    By redders in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2011, 03:52 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