Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
For Each Subtotal/Bold, Add xlDouble
For each cell with bold text, which is actually a subtotal, how can I
underscore the cell, with double lines, and have the same, extending 8 cells to the right of this? The subtotals are in column C. I figure it will be something like this: For each With Selection.Borders(xlEdgeBottom) .LineStyle = xlDouble .Weight = xlThick .ColorIndex = xlAutomatic End With Next Ive done it before, on another project, but I cant find the code anywhere in my library of code. Please help! Thanks, Ryan--- -- RyGuy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
For Each Subtotal/Bold, Add xlDouble
Give this a go.....
dim Rng as Range For each Rng in Range("C1:C" & Range("A1").SpecialCells(xlCellTypeLastCell).Row) if rng.font.bold then With rng.Borders(xlEdgeBottom) .LineStyle = xlDouble .Weight = xlThick .ColorIndex = xlAutomatic End With end if Next rng HTH Rob "ryguy7272" wrote: For each cell with bold text, which is actually a subtotal, how can I underscore the cell, with double lines, and have the same, extending 8 cells to the right of this? The subtotals are in column C. I figure it will be something like this: For each With Selection.Borders(xlEdgeBottom) .LineStyle = xlDouble .Weight = xlThick .ColorIndex = xlAutomatic End With Next Ive done it before, on another project, but I cant find the code anywhere in my library of code. Please help! Thanks, Ryan--- -- RyGuy |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
For Each Subtotal/Bold, Add xlDouble
Give this macro a try...
Sub PlaceBottomDoubleBorderLines() Dim C As Range For Each C In Range("C1").Resize(Cells(Rows.Count, "C").End(xlUp).Row) If C.Font.Bold Then With C.Resize(, 8).Borders(xlEdgeBottom) .LineStyle = xlDouble .Weight = xlThick .ColorIndex = xlAutomatic End With End If Next End Sub -- Rick (MVP - Excel) "ryguy7272" wrote in message ... For each cell with bold text, which is actually a subtotal, how can I underscore the cell, with double lines, and have the same, extending 8 cells to the right of this? The subtotals are in column C. I figure it will be something like this: For each With Selection.Borders(xlEdgeBottom) .LineStyle = xlDouble .Weight = xlThick .ColorIndex = xlAutomatic End With Next Ive done it before, on another project, but I cant find the code anywhere in my library of code. Please help! Thanks, Ryan--- -- RyGuy |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
For Each Subtotal/Bold, Add xlDouble
Rob, it just underlined the cells in Column C, but that's ok; I can work with
it. Rick, worked exactly as I expected. Now, I'm going to save this code in a safe place and I'll know where to find it next time I need it!! Thanks guys!! Ryan--- -- RyGuy "Rick Rothstein" wrote: Give this macro a try... Sub PlaceBottomDoubleBorderLines() Dim C As Range For Each C In Range("C1").Resize(Cells(Rows.Count, "C").End(xlUp).Row) If C.Font.Bold Then With C.Resize(, 8).Borders(xlEdgeBottom) .LineStyle = xlDouble .Weight = xlThick .ColorIndex = xlAutomatic End With End If Next End Sub -- Rick (MVP - Excel) "ryguy7272" wrote in message ... For each cell with bold text, which is actually a subtotal, how can I underscore the cell, with double lines, and have the same, extending 8 cells to the right of this? The subtotals are in column C. I figure it will be something like this: For each With Selection.Borders(xlEdgeBottom) .LineStyle = xlDouble .Weight = xlThick .ColorIndex = xlAutomatic End With Next Ive done it before, on another project, but I cant find the code anywhere in my library of code. Please help! Thanks, Ryan--- -- RyGuy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
conditional formating bold is true not bold false how | Excel Programming | |||
subtotal bold | Excel Programming | |||
Bold & add line after subtotal row | Excel Worksheet Functions | |||
Excel subtotal function- put subtotals in bold text | Excel Discussion (Misc queries) | |||
excel subtotal funtion how do you get the result in bold type? | Excel Worksheet Functions |