Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
conditional formating bold is true not bold false how victorio0704 Excel Programming 4 June 25th 08 04:29 PM
subtotal bold Helmut Excel Programming 9 February 11th 08 03:47 PM
Bold & add line after subtotal row PHisaw Excel Worksheet Functions 9 September 7th 07 08:22 PM
Excel subtotal function- put subtotals in bold text EPMMGR06 Excel Discussion (Misc queries) 2 August 31st 06 05:47 PM
excel subtotal funtion how do you get the result in bold type? Avtarstew Excel Worksheet Functions 1 May 4th 06 01:30 PM


All times are GMT +1. The time now is 06:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"