+ Reply to Thread
Results 1 to 3 of 3

Loop through range, applying bold formatting to chara before first line break in each cell

  1. #1
    Registered User
    Join Date
    06-08-2011
    Location
    singapore
    MS-Off Ver
    Excel 2003
    Posts
    8

    Loop through range, applying bold formatting to chara before first line break in each cell

    I am trying to put together a macro that loops through a range of cells and apply bold formatting to all characters appearing before the first line feed within each cell.
    The macro below seems to work only on the first cell in the range ("A5") and I wonder if it has something to do with the applicability of "ActiveCell" in such a context.

    Hope somebody can point out what I am missing here .

    Thanks!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Loop through range, applying bold formatting to chara before first line break in each

    Within the loop change ActiceCell to rCell.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    06-08-2011
    Location
    singapore
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Loop through range, applying bold formatting to chara before first line break in each

    Thanks, I knew it was going to be something really obvious :p.

+ 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] When clicking cell within range, make it bold. If already bold, make it not bold
    By jokris in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-08-2016, 07:12 PM
  2. Replies: 7
    Last Post: 08-06-2014, 08:47 AM
  3. Automation: applying conditional formatting to group of cells in a loop
    By ×_× in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-21-2014, 12:11 PM
  4. [SOLVED] Applying Conditional Formatting to a Range in VBA (range is set by variables)
    By JungleJme in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-12-2013, 08:32 AM
  5. Applying page break function conditionally on the basis of cell value using macro
    By crusader2010 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2010, 11:50 PM
  6. [SOLVED] Break cell into multiple lines by line break
    By Chia in forum Excel General
    Replies: 1
    Last Post: 08-20-2006, 01:40 AM
  7. [SOLVED] line break in a cell-Is there a way to get the line break instead of a symbol?
    By luvgreen in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-14-2005, 02:05 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