+ Reply to Thread
Results 1 to 14 of 14

wildcards in formulaes

Hybrid View

  1. #1
    Registered User
    Join Date
    01-17-2008
    Location
    canadaaaaa
    MS-Off Ver
    2019
    Posts
    55

    wildcards in formulaes

    sorry for the stupid quesiton but i cant seem to figure it out :

    i want to detect when cell has : anything+space+DASH+space+anything : 09/07/2021 - 6070608

    i used =T63="* - *" still comes out as false

    can someone smarted tell me what ive missed?

    thaaaanks

  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
    28,408

    Re: wildcards in formulaes

    Please see yellow banner at top of page on how to attach a sample workbook.

    And can you please update your profile with your location and Excel version: responses depend on knowing this information.

  3. #3
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,691

    Re: wildcards in formulaes

    Just use FIND:

    =FIND(" - ",A1)
    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.

  4. #4
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,091

    Re: wildcards in formulaes

    Formula: =LEN(SUBSTITUTE(SUBSTITUTE(T63," - ","XXX")," ",""))>=5, assuming "anything" means "anything but space".

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,829

    Re: wildcards in formulaes

    Try it this way:

    =COUNTIF(T63,"* - *")>0

    Hope this helps.

    Pete

  6. #6
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,091

    Re: wildcards in formulaes

    Quote Originally Posted by josephteh View Post
    Formula: =LEN(SUBSTITUTE(SUBSTITUTE(T63," - ","XXX")," ",""))>=5, assuming "anything" means "anything but space".
    Sorry.. wrong answer above. Try this: =AND(ISNUMBER(FIND(" - ",T63)),LEN(T63)-LEN(SUBSTITUTE(T63," ",""))=2)

  7. #7
    Registered User
    Join Date
    01-17-2008
    Location
    canadaaaaa
    MS-Off Ver
    2019
    Posts
    55

    Re: wildcards in formulaes

    guess i didnt ask the question correctly, i would like a true or false value to be returned if : " - " is found in a cell with any numbers or characters before or after

    this is the type of format in the cell : 09/07/2021 - 6070608

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,691

    Re: wildcards in formulaes

    Try this:

    =IF(ISNA(FIND(" - ",A1)),FALSE,TRUE)

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,829

    Re: wildcards in formulaes

    Did you try my formula?

    Pete

  10. #10
    Registered User
    Join Date
    01-17-2008
    Location
    canadaaaaa
    MS-Off Ver
    2019
    Posts
    55

    Re: wildcards in formulaes

    yes yes pete wins! clapclapclap

    i though =T63="* - *" would have worked... mind you two equals in one equation doestn make much sence. i just didnt know how to write it.

    thanks

  11. #11
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,829

    Re: wildcards in formulaes

    Thanks for the rep, paascal.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Pete

  12. #12
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,091

    Re: wildcards in formulaes

    Quote Originally Posted by paascal View Post
    yes yes pete wins! clapclapclap

    i though =T63="* - *" would have worked... mind you two equals in one equation doestn make much sence. i just didnt know how to write it.

    thanks
    Did you check that " - " is suffice without the "*" in the formulas? Do you want " - " (double spaces before and after "-") to be recognised as TRUE?

  13. #13
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,091

    Re: wildcards in formulaes

    Maybe a simple
    =ISNUMBER(FIND(" - ",T63))

  14. #14
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,091

    Re: wildcards in formulaes

    Dear paascal,

    It is not about who wins and gets the credit. It's disappointing that you failed to acknowledge the contributions by Ali and myself. You didn't mention what's wrong, if any, about our formulas.

+ 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. Date Formulaes
    By Patish in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-01-2018, 06:30 AM
  2. [SOLVED] Vba disable enable formulaes
    By Throughstream in forum Excel General
    Replies: 4
    Last Post: 04-04-2017, 08:27 AM
  3. [SOLVED] COUNTIF multiple formulaes
    By Lewis333 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-02-2013, 07:52 AM
  4. Copy formulaes to next column and make the previous data static(remove the formulaes)
    By deeps1403 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-05-2011, 03:16 AM
  5. Add New Row with formulaes
    By bengaluru in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-08-2011, 02:42 PM
  6. Unable to drag the formulaes
    By Rajkumar in forum Excel General
    Replies: 3
    Last Post: 04-12-2009, 04:27 AM
  7. I'm stuck on how to do these formulaes
    By snagrat in forum Excel General
    Replies: 5
    Last Post: 01-22-2007, 06:03 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