![]() |
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? |
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? |
All times are GMT +1. The time now is 12:02 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com