• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Name Manager assistance.

Eloise T

Active Member
In the "Sixth" tab of the workbook, in Column C, there are 9 cells (C3 through C11) where part of the characters are in Bold Red because those characters are listed in the Name Manager. Cells C12 through C14 are also listed in the Name Manager but the 75 is not Bold Red like I think it should be....Why not?
upload_2018-9-7_17-24-51.png
Special note to look at the REDnBOLD macro.

Please see attached file. Thanks for looking.
 

Attachments

  • Sanitized TABBED Invoice.xlsm
    572.4 KB · Views: 10
Last edited:
Conditional formatting (call it CF) can be quirky, but I think we've got it solved.
When I open your most recent file (Office 365) I get this:
upload_2018-9-8_11-4-3.png
Note:
1. That there are no gradient fills
2. The bottomost cells with 75 have no red bolding, but cells above have. It seems maybe because they are the first characters, not mid-string characters.

To correct this select a cell in the range, go into the CF and Manage rules…
upload_2018-9-8_11-10-39.png
and double-click or edit the errant one (selected above). Actually, there are several errant ones.

Go into Format…
upload_2018-9-8_11-12-28.png

Go to the Font tab (note that Regular is selected as part of the CF and that the colour is Black; this is what is overriding manual/vba highlighting) and click Clear:
upload_2018-9-8_11-14-9.png

If Clear is greyed out, choose, say, Bold in the Font Style section, which should enable the button and press Clear Again. Click OK. OK again.
Click Apply.
I now get this:
upload_2018-9-8_11-17-20.png

Now I've not only got the red bolding you want, but also the gradient fill.
It may pay you to do something similar to the other CFs in that range.
 
there are 9 cells (C3 through C11) where part of the characters are in Bold Red because those characters are listed in the Name Manager.
Just to point out that the Bold Red is not because of Name Manager entries, but solely down to the RednBold macro which highlights the first pair of digits found in the string between 70 and 90 inclusive.
The Name Manager entries are used in conditional formatting mainly to change the background in the cell when it finds more specific character sequences. In fact, its altering of the font characteristics was the cause of this present problem.
 
@p45cal
Nice piece of detective work and I liked the effort you had put into the presentation. To get the gradient fills, I had to start from scratch and redefine them though. I don't think I have come across conditional formatting that is quite as 'exuberant' before!
 
Thank you p45cal (outstanding) and Hui. The [Clear] immediately solved the issue. I don't why I didn't run across this problem before as I have added more entries to the Name Manager in the past without problems. I would have never figured out using the clear button would have solved the problem.

For some unknown reason (to me), the CFs have always given me problems (not just in this Excel file) as they want to "self-adjust" without my permission. My solution was to create 2 macros (Conditional_Format_Reset) and (REDnBOLD) to whip them back into shape. :)
 
Last edited:
My solution was to create 2 macros (Conditional_Format_Reset) and (REDnBOLD) to whip them back into shape. :)
If you use Conditional_Format_Reset then you're likely to re-introduce the problem! In the code for the relevant CFs, you have several instances of lines like:
Code:
      .FormatConditions(.FormatConditions.Count).Font.ColorIndex = 1    'Black font
      .FormatConditions(.FormatConditions.Count).Font.Bold = False
      .FormatConditions(.FormatConditions.Count).Font.Italic = False
You need to remove them just for those SearchFor CFs. Remember, this is to ensure RednBold works when the numerals to be highlighted are at the beginnng of the string, so you won't see the effect of removing those lines of code until you have such numbers.
 
Last edited:
Back
Top