Formatting for macro

krcherrey

New Member
Joined
Aug 22, 2014
Messages
10
I have a spreadsheet that is set up to update task numbers with WSB formatting and I need to have this formula BOLD the content in cells (r, 2) if the font is size 12. Can someone please help me write a formula for my macro that will do this?

This is the formatting that I have currently. The last line is showing to bold everything that is indent 3... or 2 decimal places. But this no longer works for me as I have some items that are headings and need to be BOLD and some that are subheading and do not need to be bold in that particular sequence...

'Apply text format: next row is deeper than current
If Cells(r + 1, 2).IndentLevel > Cells(r, 2).IndentLevel Then
Cells(r, 1).Font.Bold = False
Cells(r, 2).Font.Bold = False
'Else (next row is same/shallower than current) no format
Else
Cells(r, 1).Font.Bold = False
Cells(r, 2).Font.Bold = False
End If
'Special formatting for master (whole number) tasks)
If Cells(r, 2).IndentLevel = 0 Then
Cells(r, 1).Font.Bold = True
Cells(r, 2).Font.Bold = True
End If
'Apply text format: depth+1)
If Cells(r, 2).IndentLevel = 3 Then
Cells(r, 1).Font.Bold = True
Cells(r, 2).Font.Bold = True

Essentially I need BOLD if .IdentLevel = 3 AND font is 12.

HELP !! Thanks
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Well, I'd think you'd want something like:
Code:
If Cells(r, 2).IndentLevel = 3 [B]And Cells(r, 2).Font.Size = 12[/B] Then
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,462
Members
449,085
Latest member
ExcelError

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top