+ Reply to Thread
Results 1 to 9 of 9

Formula to return number based on cell 'Begins With'

  1. #1
    Registered User
    Join Date
    02-03-2018
    Location
    Manchester, UK
    MS-Off Ver
    2013
    Posts
    76

    Formula to return number based on cell 'Begins With'

    Hi people,

    I need to monitor the how many cells begin with a certain combination.

    For some reason, the COUNTIF formula doesn't work for what I need it to.

    I have cells that begin with 10/02 or 11/03 - and then comments. However, the formula doesn't pick this up.

    Can somebody help? I've attached a workbook to show.

    Thank you,

    Lee.
    Attached Files Attached Files

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

    Re: Formula to return number based on cell 'Begins With'

    Like this ? =COUNTIF($B$4:$B$21;"10/02"&"*")

  3. #3
    Registered User
    Join Date
    02-03-2018
    Location
    Manchester, UK
    MS-Off Ver
    2013
    Posts
    76

    Re: Formula to return number based on cell 'Begins With'

    Hi Pepe,

    That's great - thank you.

    I had to change ; to , - works perfectly!

    Lee.

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

    Re: Formula to return number based on cell 'Begins With'

    Oops, I forgot again ( good thing that you spotted it)

  5. #5
    Registered User
    Join Date
    02-03-2018
    Location
    Manchester, UK
    MS-Off Ver
    2013
    Posts
    76

    Re: Formula to return number based on cell 'Begins With'

    Hi Pepe,

    I was wondering - the formula only counts if the cell beings with 10/02 - is there a formula to count the entire number of 10/02s in the cell?

    Thank you,

    Lee.

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

    Re: Formula to return number based on cell 'Begins With'

    I don't see what you mean

  7. #7
    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
    81,237

    Re: Formula to return number based on cell 'Begins With'

    the formula only counts if the cell begins with 10/02
    Not surprising, really, since that's what you asked for.

    Like Pepe, I don't understand what you mean by " to count the entire number of 10/02s" - do you need to share an updated sample set of data with us to show what you mean, because it certainly isn't clear from the attachment we have.
    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.

  8. #8
    Registered User
    Join Date
    02-03-2018
    Location
    Manchester, UK
    MS-Off Ver
    2013
    Posts
    76

    Re: Formula to return number based on cell 'Begins With'

    Hopefully I can explain below:

    I make a phone call on and put - 10/02.

    The COUNTIF can count the beginning and counts 10/02 as 1.

    If I phone the next day, I begin the cell with 11/02. In the cell it would look like this:

    11/02 - comments
    10/02 - comments

    The COUNTIF will only count the 11/02 and ignore the 10/02.

    I was hoping for a formula to count 10/02 that is buried in the overall cell? I have cells that look like this:

    13/02 - misc
    12/02 - comments
    11/02 - other
    10/02 - comments

    Does that make sense?

    Thanks,

    Lee.

  9. #9
    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
    81,237

    Re: Formula to return number based on cell 'Begins With'

    Please provide an updated sample data set showing the new criteria and what you want.

    It is NOT good practice to have multiple data items in one cell - consider whether you really need to do it this way. I would suggest that you don't: a normalised dataset will be much easier to maintain and analyse. Put function before form.

+ 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] If cell begins with given text then return value
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-24-2018, 12:06 AM
  2. Search and Return the value of a cell that begins with specific text?
    By Kirk3737 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-14-2015, 12:35 PM
  3. Replies: 3
    Last Post: 06-30-2015, 10:28 AM
  4. sumif cell begins with a number but also contains letters
    By agni452 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-28-2013, 09:25 PM
  5. [SOLVED] if cell BEGINS WITH abc, then return 123, or if cell BEGINS WITH def, then 456, ...
    By Marijke in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-29-2013, 11:20 AM
  6. [SOLVED] IF number/text in a cell begins with specific letter, then return desired word
    By BPSJACK in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-28-2013, 06:02 AM
  7. [SOLVED] Insert text to cell based on whether the value begins with a letter or number.
    By BPSJACK in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-23-2012, 09:57 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