+ Reply to Thread
Results 1 to 7 of 7

Seach Function with multiple Criteria

  1. #1
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Seach Function with multiple Criteria

    Hi,
    Current I am using below function,

    Please Login or Register  to view this content.
    I want to add another criteria in above function which is that >> IF(SEARCH("Sales" OR "Debit",C1334) then J1334 but if (C1334="",then 0)

    i.e
    Please Login or Register  to view this content.
    &
    Please Login or Register  to view this content.
    &
    Please Login or Register  to view this content.

    How to combine into one.
    Last edited by paradise2sr; 10-23-2020 at 02:21 AM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Seach Function with multiple Criteria

    One way:

    =IF(SUMPRODUCT(--(NOT(ISERR(SEARCH($E$1:$E$2,A2)))))>0,$G$1,"")

    see sheet for set-up. Adjust the ranges to suit your sheet.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Seach Function with multiple Criteria

    Oops it not working in my case,when I modify it to

    -
    Please Login or Register  to view this content.
    It should produce result -J1334 when there is text "Credit" i.e is you have to combine this function also
    Please Login or Register  to view this content.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Seach Function with multiple Criteria

    Ooops. See sheet again:

    =IF(SUMPRODUCT(--(NOT(ISERR(SEARCH({"Sales","Debit"},A2)))))>0,B2,IF(ISNUMBER(SEARCH("Credit",A2)),-B2,0))
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Smile Re: Seach Function with multiple Criteria

    ok now based on your formula,
    Please Login or Register  to view this content.
    It has now worked.

    Thanx for the help.

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Seach Function with multiple Criteria

    Look like nagative values in only for "Credit"?

    Try:

    Please Login or Register  to view this content.
    @Glenn, OP expected zero only if C1334="", but yours gives zero for cell with "blah blah"
    Quang PT

  7. #7
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Seach Function with multiple Criteria

    Kindly mark this thread as solved as "Thread solved" option is not displaying.

+ 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. Seach box to seach for all letters in cell regardless of combination.
    By noes75 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-28-2018, 05:27 PM
  2. Control F seach Function
    By NYC4LIFE in forum Excel General
    Replies: 2
    Last Post: 05-31-2013, 12:42 PM
  3. Macro to return a cell reference based on a seach criteria?
    By Al_O_L in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-29-2012, 08:47 AM
  4. Can this be done? Use macro to seach names with find function to start...
    By NZB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-17-2010, 03:17 AM
  5. Function to seach a max value from ddmmyyhh
    By Mohsin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-14-2006, 03:14 AM
  6. Inserting a string seach within a complex function
    By DJ_Swammi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-15-2005, 05:35 PM
  7. Seach with multiple results
    By LB79 in forum Excel General
    Replies: 0
    Last Post: 04-26-2005, 05:23 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