+ Reply to Thread
Results 1 to 12 of 12

If function wild card. CountIF or Match?

  1. #1
    Forum Contributor
    Join Date
    06-20-2007
    Location
    Buckeye, AZ
    MS-Off Ver
    365
    Posts
    272

    If function wild card. CountIF or Match?

    In the attached sample I'm trying to return values based on multiple IF functions but I need a wild card feature that doesn't exist. In plain language I'm trying to get the following:
    IF(C3="TCF*,"TCF",IF(B3=1* or 2* or 3* or 4*,"FS","PS"))
    I'm not sure if I need a CountIF or a Match?
    Any help would be greatly appreciated!
    Sick
    Attached Files Attached Files
    Last edited by sick stigma; 02-15-2018 at 01:29 PM.

  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,978

    Re: Nightmare IF Function

    Please take a moment to re-read forum rule #1 and then amend your thread title to something that better explains your problem. Changing your thread title is not optional, which means you must change it. Thanks!

    • Use concise, accurate thread titles.
    • Your post title should describe your problem, not your anticipated solution.
    • Use terms appropriate to a Google search - poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice tell us nothing.
    • Responding to a request to change your thread title by doing so is mandatory.

    To change a title go to your first post, click EDIT then Go Advanced and change your title.

    No help to be offered, please, until the OP complies with this request.

    I have a solution for you - just need you to update the title, please.
    Last edited by AliGW; 02-15-2018 at 12:56 PM.
    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 Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: If function wild card. CountIF or Match?

    Try this in A3:

    =IF(COUNTIF(C3,"TCF*"),"TCF",IF(OR(LEFT(B3)={"1","2","3","4"}),"FS","PS"))

  4. #4
    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,978

    Re: If function wild card. CountIF or Match?

    Does this get you closer to what you want?

    =IF(C3="TCF*","TCF",IF(--LEFT(B3,1)<4,"FS","PS"))

  5. #5
    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,064

    Re: If function wild card. CountIF or Match?

    or this:

    =IF(LEFT(C3,3)="TCF","TCF",IF(OR(LEFT(B3,1)+0={1,2,3,4}),"FS","PS"))
    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

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: If function wild card. CountIF or Match?

    I shortened your formula to this...
    =IF(C3="TCF*","TCF",IF(OR(B3="1",B3="2*",B3="3*"),"FS","PS"))

    But I dont understand what the problem is? Can you explain why this isnt working for you?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Forum Contributor
    Join Date
    06-20-2007
    Location
    Buckeye, AZ
    MS-Off Ver
    365
    Posts
    272

    Re: If function wild card. CountIF or Match?

    I took elements from both and finished with this
    =IF(OR(LEFT(C3)={"T"}),"TCF",IF(OR(LEFT(B3)={"1","2","3","4"}),"FS",IF(OR(LEFT(B3)={"Q","G"}),"TCF","PS"))

    Thank you both.
    Sick

  8. #8
    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,978

    Re: If function wild card. CountIF or Match?

    Which both of the three of us are you thanking? The two boys, I guess.

    Glad to have helped (I think)!

  9. #9
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: If function wild card. CountIF or Match?

    Is If condition works with wild card?
    I think If condition will not work with wild card
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

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

    Re: If function wild card. CountIF or Match?

    Thanks for the rep! Glad we could help.

    Note that you can shorten your formula from post #7 to this:

    =IF(OR(LEFT(C3)="T",LEFT(B3)={"Q","G"}),"TCF",IF(OR(LEFT(B3)={"1","2","3","4"}),"FS","PS"))

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: If function wild card. CountIF or Match?

    Curious, is Sick Stigma a play on words for Six Sigma?
    (I am trained to black belt, but not certified...well, I AM certified, but that's mentally, by a doctor LOL)

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: If function wild card. CountIF or Match?

    Happy to help and thanks for the feedback

+ 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] Vlookup nightmare!
    By Sph01 in forum Excel General
    Replies: 6
    Last Post: 06-20-2012, 12:17 PM
  2. equation nightmare
    By percentache in forum Excel General
    Replies: 1
    Last Post: 09-14-2009, 03:22 PM
  3. Vba nightmare
    By JAMES BROADBENT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-15-2008, 10:22 AM
  4. Charting Nightmare!!!!
    By gazzafm in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-21-2008, 08:43 AM
  5. !! this is a nightmare need help
    By khalid79m in forum Excel General
    Replies: 3
    Last Post: 12-21-2006, 12:31 PM
  6. Concatenate Nightmare!
    By Max in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-11-2006, 01:45 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