+ Reply to Thread
Results 1 to 9 of 9

Macro to rename cell content based on the starting character until found same character

  1. #1
    Forum Contributor
    Join Date
    12-17-2012
    Location
    indonesia
    MS-Off Ver
    Excel 2019
    Posts
    170

    Macro to rename cell content based on the starting character until found same character

    Hi , Is there a macro to to rename cell content based on the starting character until found same character .
    B1 Cafe
    B2 qty
    B3 unit
    B4 Cafe
    B5 Lobby
    B6 qty
    B7 unit
    B8 Lobby

    It will Be
    B1 Cafe
    B2 Cafe
    B3 Cafe
    B4 Cafe
    B5 Lobby
    B6 Lobby
    B7 Lobby
    B8 Lobby
    Attached Files Attached Files
    Last edited by oeyandyprawira; 09-18-2015 at 07:23 PM.

  2. #2
    Forum Contributor
    Join Date
    03-12-2013
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    230

    Re: Macro to rename cell content based on the starting character until found same characte

    Try this:
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Macro to rename cell content based on the starting character until found same characte

    this one looks for the begin and the end in column A

    Please Login or Register  to view this content.
    Kind regards
    Leo
    Attached Files Attached Files

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Macro to rename cell content based on the starting character until found same characte

    Perhaps
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Forum Contributor
    Join Date
    12-17-2012
    Location
    indonesia
    MS-Off Ver
    Excel 2019
    Posts
    170

    Re: Macro to rename cell content based on the starting character until found same characte

    Quote Originally Posted by mikerickson View Post
    Perhaps
    Please Login or Register  to view this content.
    Thx Mike, but all of them rename to The Park Lane, Jakarta

    tes1.jpg

  6. #6
    Forum Contributor
    Join Date
    12-17-2012
    Location
    indonesia
    MS-Off Ver
    Excel 2019
    Posts
    170

    Re: Macro to rename cell content based on the starting character until found same characte

    Quote Originally Posted by LeoTaxi View Post
    this one looks for the begin and the end in column A

    Please Login or Register  to view this content.
    Kind regards
    Leo
    Thx Leo, but All of them rename to Beverage banquet

    tes2.jpg

  7. #7
    Forum Contributor
    Join Date
    12-17-2012
    Location
    indonesia
    MS-Off Ver
    Excel 2019
    Posts
    170

    Re: Macro to rename cell content based on the starting character until found same characte

    Quote Originally Posted by majosum View Post
    Try this:
    Please Login or Register  to view this content.
    Thx Majo, but it ended with error
    tes3.jpg

  8. #8
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Macro to rename cell content based on the starting character until found same characte

    1 mistake in previus, this should be the good one

    Please Login or Register  to view this content.
    Kind regards

  9. #9
    Forum Contributor
    Join Date
    12-17-2012
    Location
    indonesia
    MS-Off Ver
    Excel 2019
    Posts
    170

    Re: Macro to rename cell content based on the starting character until found same characte

    Dear Leo,

    Thx it worked.

+ 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. remove all text starting from specific character in a cell
    By itselflearn in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-24-2015, 12:17 PM
  2. How can i Found Space at end of character in a Cell?
    By Subashvivek in forum Hello..Introduce yourself
    Replies: 4
    Last Post: 08-08-2014, 12:59 AM
  3. Changing last character in a cell based on the character before it
    By Falcongbz in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 04-29-2013, 12:31 PM
  4. Macro to find character and delete all text in cell after the character
    By SpencerRichman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2012, 06:08 PM
  5. replace first character of cell content
    By Armitage2k in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-26-2009, 11:33 AM
  6. Clear content of cell if has some character.
    By Krzys in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-23-2007, 09:20 PM
  7. Truncate cell content after a certain character
    By brakai295 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-19-2006, 07:33 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