+ Reply to Thread
Results 1 to 5 of 5

IF and FIND formula

  1. #1
    Registered User
    Join Date
    12-06-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    13

    IF and FIND formula

    The agency I'm Working for has requested a change/addition and to be honest I'm not sure it's possible.
    I made a post back in October on the same topic https://www.excelforum.com/excel-for...statement.html

    My original question was:

    So I'm working on an intuitive schedule for the ambulance agency I work for.
    I have a 4 column with headers "Crew 1" (C5), "Crew 2" (D5), "Comments" (G5) and "Status" (I5)
    The formula will be in the status column and need it to search for multiple things. First, if both crew1 and crew 2 are blank, status should be "Closed"
    If Crew 1 has text, but crew 2 is blank, status should be "Open Shift"
    If Both crew 1 and crew 2 have text Status should say "In-Service"
    Lastly, if the comments section has the word "EMS" anywhere in it I need status to say "ROA EMS"
    Below is what I came up with, which works a little, but the EMS part is a little wonky.
    Thanks to the response of AliGW, I began using the following:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This was perfect until someone needed to change it...

    The same amount of columns, just different function. For ease, I have the original question posted below and the changes being made from the original are in bold.

    I have a 4 column with headers "Crew 1" (C5), "Crew 2" (D5), "Comments" (G5) and "Status" (I5)
    The formula will be in the status column and need it to search for multiple things.
    First, if both crew1 and crew 2 are blank, status should be "Closed"
    If Crew 1 has text, but crew 2 is blank, or vice versa, Crew 1 is blank, but crew 2 has text status should be "Open Shift"
    If Both crew 1 and crew 2 have text Status should say "In-Service"
    If the comments section has the word "Carilion EMS" anywhere in it I need status to say "Carilion EMS"
    If the comments section has the word "Roanoke EMS" anywhere in it I need status to say "ROA EMS"


    Again, I'm not sure if this is even possible based on the attempts I've made at this, but if anyone can help let me know! Thanks!
    Attached Files Attached Files
    Last edited by Ducky405; 05-09-2019 at 10:12 PM.

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,373

    Re: IF and FIND formula

    Perhaps, put this on G8 and copied down

    =TRIM(IF(COUNTA(D8:E8)=0,"Closed",IF(COUNTA(D8:E8)=1,"Open Shift",IF(AND(COUNTA(D8:E8)=2,F8="shift change"),"In-Service",LEFT(F8,SEARCH("/",F8,1)-1)))))
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: IF and FIND formula

    Azumi's solution appears to generate "Roanoke EMS" rather than the required "ROA EMS".

    Here is another possibility that is a fairly small modification of Ali's original formula and generates the expected results. In H8 and copied down:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    12-06-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    13

    Re: IF and FIND formula

    That worked,thank you so much! This forum never disappoints when I get stumped.

  5. #5
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: IF and FIND formula

    Glad to help. Thanks for the feedback and rep.

+ 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. i need to find a formula to find the top three values in a column
    By silentscribbles in forum Excel General
    Replies: 1
    Last Post: 11-07-2017, 04:07 AM
  2. Replies: 1
    Last Post: 04-10-2017, 03:33 PM
  3. Replies: 3
    Last Post: 09-12-2016, 01:44 PM
  4. Replies: 5
    Last Post: 06-07-2014, 09:54 AM
  5. [SOLVED] Trying to find a formula to find a random $ amount in a text in a cell
    By Miki1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-28-2013, 10:13 PM
  6. IF formula to find a word but Not find a certain phrase
    By byrdjulie in forum Excel General
    Replies: 2
    Last Post: 02-03-2011, 05:18 AM
  7. Find Formula needs to find jobs with split names
    By 3smees23 in forum Excel General
    Replies: 5
    Last Post: 08-06-2009, 08:18 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