+ Reply to Thread
Results 1 to 9 of 9

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

  1. #1
    Registered User
    Join Date
    04-29-2017
    Location
    Midwest
    MS-Off Ver
    Office 365
    Posts
    32

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

    Hello Everybody
    I'm looking for a way to take my pivot table created from a list of values
    and to make certain items in the pivot table Bold with a Macro

    the list changes Daily, and the placement of items changes with it

    so it needs to be flexible as to size in rows to allow for more or less rows in the pivot table each day

    I do not mind having to have another sheet with a predefined list on it if that is what it takes

    but for example, in my sheet - in the "pivot outbound" tab
    I have a couple of items Manually set to Bold
    and I'd like to be able to run a Macro to do this task for me

    it needs to be for every instance of those values in the entire sheet, not just cell "F6" every time

    Thanks for your help
    it will be greatly appreciated
    Attached Files Attached Files
    Last edited by s2h; 10-19-2017 at 11:42 PM.

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

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

    Hi s2h,

    See the attached that has a macro that will do what I think you want.

    Please Login or Register  to view this content.
    Bold Pivot Table bases on List.xlsm

    You will need to add to the Bold List to include others descriptions that you want.
    To fire the macro you will need to tab away from the Pivot Tab and then back to it.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    04-29-2017
    Location
    Midwest
    MS-Off Ver
    Office 365
    Posts
    32

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

    Quote Originally Posted by MarvinP View Post
    Hi s2h,

    See the attached that has a macro that will do what I think you want.

    Please Login or Register  to view this content.
    Attachment 543595

    You will need to add to the Bold List to include others descriptions that you want.
    To fire the macro you will need to tab away from the Pivot Tab and then back to it.
    that does the function I need, but I have 6 different sheets that need it to happen it (they can all share the same Bold list)
    and I'm looking for it to run once when I run the main sorting macro which isnt listed on this file
    what do I need to change to add it to my main macro to tell it to run on every sheet

    we dont want it to run everytime we change views... we only want a once and done macro

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

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

    I need a better example of 6 sheets etc.

    You could try to put this macro behind each pivot sheet. You will also need to have a sheet called BoldList in the workbook.

  5. #5
    Registered User
    Join Date
    04-29-2017
    Location
    Midwest
    MS-Off Ver
    Office 365
    Posts
    32

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

    Putting it in each sheet seems to work well....

    if I wanted to have it also add a color to it... like red for example
    what do I need to add to it??
    Font style????? do I need to add the Hex Color Code??
    Whats VBA Method for adding color to the text?

    basically I want to make them Bold... and RED
    or BOLD and Some other color

    I dont need it to do different colors on the same page... I just need to make one of the pages Bold it to RED instead of default text color
    Last edited by s2h; 10-20-2017 at 07:29 PM.

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

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

    Hi s2h,

    Do this:
    Turn Macro Record On and then select a cell and format the text as you want and then turn the Macro Record Off. Look at the code that is recorded in VBA. Pick the parts of the .Font that you want/need. Here is what I get when I do this:
    Please Login or Register  to view this content.
    You can learn a lot of VBA by simply recording a macro and see what VBA thinks you did.

  7. #7
    Registered User
    Join Date
    04-29-2017
    Location
    Midwest
    MS-Off Ver
    Office 365
    Posts
    32

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

    I understand how to do that...
    but what I dont understand is what needs to change in this Private MAcro that automatically changes my list to bold... what/where do I need to place to make it also add a red color to that text that is being converted to bold based on my list...

    where is this VBA do I add that stuff

    Please Login or Register  to view this content.
    do I add that color and font stuff after the Cells(PORowCtr, "F").Font.FontStyle = "Bold" part of the code???

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

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

    Try this:
    Please Login or Register  to view this content.
    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.

  9. #9
    Registered User
    Join Date
    04-29-2017
    Location
    Midwest
    MS-Off Ver
    Office 365
    Posts
    32

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

    Perfect.. Thanks
    you have been a great help...

+ 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] 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. 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