Results 1 to 9 of 9

need help with a macro to make certain text within the entire sheet BOLD

Threaded View

  1. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,234

    Re: need help with a macro to make certain text within the entire sheet BOLD

    Try this:
    Private Sub Worksheet_Activate()
        Dim wsBL As Worksheet
        Dim LastPORow As Double
        Dim LastBLRow As Double
        Dim PORowCtr As Double
        Dim BLRowCtr As Double
        
        Set wsBL = ActiveWorkbook.Sheets("BoldList")
        ActiveWorkbook.RefreshAll
        
        LastPORow = Cells(Rows.Count, "F").End(xlUp).Row
        LastBLRow = wsBL.Cells(Rows.Count, "A").End(xlUp).Row
        
        Columns("F:F").Font.FontStyle = "Regular"
        
        For PORowCtr = 6 To LastPORow
            For BLRowCtr = 2 To LastBLRow
            With wsBL
                If Cells(PORowCtr, "F") = .Cells(BLRowCtr, "A") Then
                Cells(PORowCtr, "F").Font.FontStyle = "Bold"
    	Cells(PORowCtr, "F").Font.Color = 255	
                End If
            End With
            Next BLRowCtr
        Next PORowCtr
        
    End Sub
    The RGB number for RED is 255. See:
    http://access-excel.tips/excel-vba-color-code-list/
    Last edited by MarvinP; 10-20-2017 at 08:13 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Excel Macro: Bold Entire Row if Cell Contains the word Total
    By arnel_10 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-11-2017, 10:09 PM
  2. [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
  3. Lop to Bold Entire Row if cell contains text
    By xfortunax in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 10-23-2015, 03:05 PM
  4. 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
  5. Macro to removed entire row on Sheet A if a text matches a condition on Sheet B
    By andy@2ggroup.ca in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-03-2012, 04:22 PM
  6. How to make some text in a Cell Bold?
    By v2jtb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-29-2012, 11:00 AM
  7. Need to make certain text bold in a comment using vba
    By Bravurian17 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-25-2009, 11:58 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