Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
bodhisatvaofboogie
 
Posts: n/a
Default Bolding Specific Cell Formula Question

I am trying to have a specific border placed around a subtotaled cell that is
selected by a formula. I have both separate formulas, and am trying to do it
by combining these two separate ones. BUT, I'm at a loss. I need to learn
this stuff better sorry for my novice questions. Okay, here's what I'm
trying to combine:


This is how I have it selecting the second empty cell below the column and
doing a subtotal of the entire column (THANKS DON!!):

LastRow = Cells(Rows.Count, "W").End(xlUp).Row
Cells(LastRow + 2, "W") = Application.Sum _
(Range(Cells(1, "W"), Cells(LastRow, "W")))

This is the border formula (actually managed this on on me own, painfully):

Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlDouble
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeRight).LineStyle = xlNone
End Sub

am I making this WAY too complicated?
  #2   Report Post  
Posted to microsoft.public.excel.misc
bodhisatvaofboogie
 
Posts: n/a
Default Bolding Specific Cell Formula Question

Yeah I made that WAYYY to complicated. I figured it out in a wonderful
moment of clarity. Thanks though for everyone's help!!!

LastRow = Cells(Rows.Count, "W").End(xlUp).Row
Cells(LastRow + 2, "W") .Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlDouble
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeRight).LineStyle = xlNone
End Sub


"bodhisatvaofboogie" wrote:

I am trying to have a specific border placed around a subtotaled cell that is
selected by a formula. I have both separate formulas, and am trying to do it
by combining these two separate ones. BUT, I'm at a loss. I need to learn
this stuff better sorry for my novice questions. Okay, here's what I'm
trying to combine:


This is how I have it selecting the second empty cell below the column and
doing a subtotal of the entire column (THANKS DON!!):

LastRow = Cells(Rows.Count, "W").End(xlUp).Row
Cells(LastRow + 2, "W") = Application.Sum _
(Range(Cells(1, "W"), Cells(LastRow, "W")))

This is the border formula (actually managed this on on me own, painfully):

Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlDouble
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeRight).LineStyle = xlNone
End Sub

am I making this WAY too complicated?

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
assign formula to another cell Dannycol Excel Worksheet Functions 3 May 12th 06 09:46 PM
question about cell reference in a formula [email protected] Excel Discussion (Misc queries) 1 April 5th 06 08:55 AM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
How do I set a cell value based on a formula in another cell? dingy101 Excel Discussion (Misc queries) 1 November 21st 05 08:51 AM


All times are GMT +1. The time now is 02:12 PM.

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

About Us

"It's about Microsoft Excel"