+ Reply to Thread
Results 1 to 14 of 14

Trying to Number Rows that Start with a Specific Word or Phrase

  1. #1
    Forum Contributor
    Join Date
    05-16-2007
    Location
    USA
    MS-Off Ver
    MS Office 2016, Excel 2016
    Posts
    214

    Trying to Number Rows that Start with a Specific Word or Phrase

    How can I get Excel to number only the rows that start with a specified word or phrase? Though, it needs to count them up as 1,2,3,4, and not just place a 1 for each row, which is where I'm stuck at using the following formula:

    Please Login or Register  to view this content.
    Is this even possible with a formula, or would I need to use VBA?


    Thank you!

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

    Re: Trying to Number Rows that Start with a Specific Word or Phrase

    Try:

    =SUMPRODUCT((LEFT(C3:C10,9)="Published")*(C3:C10<>""))

    Change the range to suit.
    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 etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Trying to Number Rows that Start with a Specific Word or Phrase

    how about
    =IF(LEFT(C3,9)="Published",COUNTIF($C$3:C3,"Published"),"")
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Contributor
    Join Date
    05-16-2007
    Location
    USA
    MS-Off Ver
    MS Office 2016, Excel 2016
    Posts
    214

    Re: Trying to Number Rows that Start with a Specific Word or Phrase

    Thanks for the super quick suggestion, though using that formula just gives me the total for all the entries.

    I need each row numbered sequentially so that when I print the list, each section will be easily referenced.
    Last edited by AliGW; 04-14-2024 at 01:08 PM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

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

    Re: Trying to Number Rows that Start with a Specific Word or Phrase

    Provide a sample workbook with a manual mock-up of what you want.

  6. #6
    Forum Contributor
    Join Date
    05-16-2007
    Location
    USA
    MS-Off Ver
    MS Office 2016, Excel 2016
    Posts
    214

    Re: Trying to Number Rows that Start with a Specific Word or Phrase

    Quote Originally Posted by etaf View Post
    how about
    =IF(LEFT(C3,9)="Published",COUNTIF($C$3:C3,"Published"),"")
    That will only work if "Published" is the only criteria, but it's not. As I mentioned in my OP, "rows that start with a specified word or phrase."

    Though I do see it is numbering sequentially, so definitely on the right track. Just need to modify it to work with StartWith if that is possible in a formula.

  7. #7
    Forum Contributor
    Join Date
    05-16-2007
    Location
    USA
    MS-Off Ver
    MS Office 2016, Excel 2016
    Posts
    214

    Re: Trying to Number Rows that Start with a Specific Word or Phrase

    Quote Originally Posted by AliGW View Post
    Provide a sample workbook with a manual mock-up of what you want.
    No need, ETAF got it figured out. Just need to tweak it to work with "startswith" rather than "equal to".

    Thanks again for trying to help. Much appreciated!

  8. #8
    Forum Contributor
    Join Date
    05-16-2007
    Location
    USA
    MS-Off Ver
    MS Office 2016, Excel 2016
    Posts
    214

    Re: Trying to Number Rows that Start with a Specific Word or Phrase

    That was an accident, I meant to quote you, but apparently clicked on mine some how. After I realized it, I tried to remove it, but apparently I'm not allowed to or just blind and couldn't find the delete button. So, I tried deleting the message in the post, but of course, it then said my post was too short. Just my luck! Can you remove the post?

  9. #9
    Forum Contributor
    Join Date
    05-16-2007
    Location
    USA
    MS-Off Ver
    MS Office 2016, Excel 2016
    Posts
    214

    Re: Trying to Number Rows that Start with a Specific Word or Phrase

    What the heck! Why are all my replies going back to myself? I know I'm not clicking on myself this many times. This is crazy! I'm going to logout and back in.

  10. #10
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Trying to Number Rows that Start with a Specific Word or Phrase

    you are welcome
    Just need to tweak it to work with "startswith" rather than "equal to".
    it would be worth posting the formula you actually used
    That way anyone searching the forum or google will see the formula which worked for your question

  11. #11
    Forum Contributor
    Join Date
    05-16-2007
    Location
    USA
    MS-Off Ver
    MS Office 2016, Excel 2016
    Posts
    214

    Re: Trying to Number Rows that Start with a Specific Word or Phrase

    Quote Originally Posted by etaf View Post
    you are welcome

    it would be worth posting the formula you actually used
    That way anyone searching the forum or google will see the formula which worked for your question
    I think you misunderstood me, as I still don't have a working formula yet. I was hoping you knew how to edit the formula you provided to work with a value that "starts with Published" not that equals "Published".

  12. #12
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Trying to Number Rows that Start with a Specific Word or Phrase

    ignore for a minute - wrong answer

    =IF(ISNUMBER(SEARCH("Published",C3,1)),COUNTIF($C$3:C3,"*"&"Published"),"")
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    05-16-2007
    Location
    USA
    MS-Off Ver
    MS Office 2016, Excel 2016
    Posts
    214

    Re: Trying to Number Rows that Start with a Specific Word or Phrase

    Quote Originally Posted by etaf View Post
    ignore for a minute - wrong answer

    =IF(ISNUMBER(SEARCH("Published",C3,1)),COUNTIF($C$3:C3,"*"&"Published"),"")
    Actually, I got it work using your previous formula, though I just added a * after Published, which makes it work as StartsWith.

    Please Login or Register  to view this content.
    Thank you for your help and quick replies!

  14. #14
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Trying to Number Rows that Start with a Specific Word or Phrase

    you are welcome

+ 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. Replies: 7
    Last Post: 09-10-2023, 12:29 AM
  2. Remove a percentage of a number based on a word/phrase
    By randerson0071 in forum Excel General
    Replies: 6
    Last Post: 01-09-2023, 07:36 PM
  3. [SOLVED] delete row if part text phrase in cell is a specific word
    By barrowinfurnace in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-18-2019, 08:05 AM
  4. Using VLOOKUP to find a specific word in a phrase and return a value
    By arnagas in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-18-2016, 11:09 AM
  5. Change the color of a specific word or a phrase in a range
    By Taisir in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-04-2015, 08:08 AM
  6. Looking for a specific word or phrase and counting how often it occurs
    By bobondi in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-12-2014, 08:10 AM
  7. combine two rows if one start with specific word
    By Devesh2006 in forum Excel General
    Replies: 1
    Last Post: 08-01-2014, 09:39 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