+ Reply to Thread
Results 1 to 3 of 3

Lop to Bold Entire Row if cell contains text

  1. #1
    Registered User
    Join Date
    07-08-2015
    Location
    California
    MS-Off Ver
    Windows 7 Professional
    Posts
    0

    Lop to Bold Entire Row if cell contains text

    Hello!

    I am currently stuck on why my loop is failing to bold the row when the cell in B contains text. My table length changes daily so the text cells in column B that would need to be bold vary. I was looking into starting from the bottom up with something like Range("B", Selection.End(xlUp)).Select but still the row would not bold. There are only 7 to 10 cells that will have text in column B, then bold the row. The table can be a few hundred rows.

    The loop is:

    Sub BoldtheRows()

    Dim TotalRows As Long, r As Long

    TotalRows = Range("B" & Rows.Count).End(xlUp).Row

    For r = 1 To TotalRows
    If Range("B" & r).Value = "*" Then
    Range("B" & r).EntireRow.Font.Bold = True
    End If
    Next r

    End Sub

    Any help would be greatly appreciated.

    Thanks,

    JT

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167
    Hello xfortunax,

    Welcome to Excelforum. Be a part of large Excel community. Enjoy Learning.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    07-08-2015
    Location
    California
    MS-Off Ver
    Windows 7 Professional
    Posts
    0

    Re: Lop to Bold Entire Row if cell contains text

    Thank you Arlu1201! Looking forward to learning as much as possible. Too bad my first post had a spelling error in the title

+ 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. Macro seems to make entire text string in cells Bold
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-01-2014, 01:30 PM
  2. [SOLVED] Copy any bold text within a cell text string to an adjacent cell
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-31-2014, 06:22 PM
  3. Replies: 2
    Last Post: 10-25-2013, 02:40 PM
  4. [SOLVED] Bold Entire Row if Certain Value
    By csch123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-18-2013, 11:28 AM
  5. Split cell - bold text and non bold text.
    By desertshift in forum Excel General
    Replies: 10
    Last Post: 11-21-2010, 08:13 PM
  6. Delete all text which is not 'bold' in cells with 'mingled bold' text
    By Excelfriend in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-23-2010, 04:47 PM
  7. Join bold and non-bold text in one cell
    By bkincaid in forum Excel General
    Replies: 3
    Last Post: 03-20-2006, 09:10 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