+ Reply to Thread
Results 1 to 12 of 12

IF statement with a Wildcard not working, workaround?

  1. #1
    Forum Contributor
    Join Date
    03-19-2019
    Location
    Essex, England
    MS-Off Ver
    Office 365
    Posts
    110

    IF statement with a Wildcard not working, workaround?

    Hi All

    I need help. I need to create a formula that shows 'overdue' if it is more than 10 days past the jobs completion date. The problem I am having is that I wanted to use an IF statement but with a wildcard but now know that is not possible but I don't know a workaround.

    I have a large spreadsheet (2000 rows) , in column A is the job ref, in Column G is the completion date and in column K is where i need the formula.

    I only need the formula to pick up jobs in column A with the prefix OLP (the refs will be something like OLP1234 but there are many others with different prefix's i.e. FLO1234, BDO1234 etc), the prefix will always be 3 letters.

    Hopefully this is enough information but of course if you need more please let me know.

    Thanks in advance.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,317

    Re: IF statement with a Wildcard not working, workaround?

    Maybe...

    =IF(AND(LEFT(A2,3)="OLP",G2+10 < TODAY()),"Overdue","")
    HTH
    Regards, Jeff

  3. #3
    Forum Contributor
    Join Date
    03-19-2019
    Location
    Essex, England
    MS-Off Ver
    Office 365
    Posts
    110

    Re: IF statement with a Wildcard not working, workaround?

    Works like a charm. Thank you very much for your quick response and expert advise, very much appreciated.

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,317

    Re: IF statement with a Wildcard not working, workaround?

    You are very welcome and thanks for the feedback.

  5. #5
    Forum Contributor
    Join Date
    03-19-2019
    Location
    Essex, England
    MS-Off Ver
    Office 365
    Posts
    110

    Re: IF statement with a Wildcard not working, workaround?

    Hi, I've only just realized that this formula displays 'overdue' even in the cell in column G is blank, I would have thought the last part of the formula would just display as blank if the criteria wasnt met but that's not the case and I'm not sure why. Can anyone see the problem?

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: IF statement with a Wildcard not working, workaround?

    Perhaps =IF(AND(LEFT(A2,3)="OLP",G2+10 < TODAY(),G2<>""),"Overdue","")

  7. #7
    Forum Contributor
    Join Date
    03-19-2019
    Location
    Essex, England
    MS-Off Ver
    Office 365
    Posts
    110

    Re: IF statement with a Wildcard not working, workaround?

    Unfortunately not, that doesn't display anything at all no matter what date is entered.

  8. #8
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,317

    Re: IF statement with a Wildcard not working, workaround?

    To avoid any more guessing, how about a sample file to work from.

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. 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 shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  9. #9
    Forum Contributor
    Join Date
    03-19-2019
    Location
    Essex, England
    MS-Off Ver
    Office 365
    Posts
    110

    Re: IF statement with a Wildcard not working, workaround?

    Test spreadsheet attached. I've not added a before and after as mentioned as I believe its all self evident in the spreadsheet attached. Of course if its not I'll do a before and after.
    Attached Files Attached Files

  10. #10
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: IF statement with a Wildcard not working, workaround?

    It looks like all that you have to do is adjust the rows in the formula from post #6.

    That is, in L5:

    =IF(AND(LEFT(A5,3)="OIL",G5+10 < TODAY(),G5<>""),"Overdue","")

  11. #11
    Forum Contributor
    Join Date
    03-19-2019
    Location
    Essex, England
    MS-Off Ver
    Office 365
    Posts
    110

    Re: IF statement with a Wildcard not working, workaround?

    Oh bl**dy hell, I owe you all an apology. My original post was for the prefix 'OLP' but that was changed (in house) and I was just amending the formulas you guys have been giving to look for 'OIL', post 6 had used the original OLP ref and I hadn't noticed, but in my defense there has been a weekend in between! Thank you all, I have slapped my wrist for being so stupid.

  12. #12
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,317

    Re: IF statement with a Wildcard not working, workaround?

    Glad you got it all sorted out and thanks for the feedback.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. [SOLVED] Solver Constraint If statement workaround
    By tdanner1993 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 01-19-2023, 01:43 AM
  2. [SOLVED] VBA Array formula over 255 character workaround - 'replace' not working
    By mon33 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2017, 07:11 AM
  3. [SOLVED] Workaround to giant nested if statement for invoice value increments
    By Miskondukt in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-05-2017, 10:40 AM
  4. Replies: 2
    Last Post: 06-19-2011, 11:48 AM
  5. Nest IF statement workaround
    By [email protected] in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-26-2006, 11:35 AM
  6. How do I use a wildcard in an if statement?
    By Lenny in forum Excel General
    Replies: 3
    Last Post: 01-26-2005, 08:06 PM
  7. [SOLVED] Wildcard Not Working in IF statement
    By [email protected] in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-09-2005, 04:08 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