Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
assign formula to another cell | Excel Worksheet Functions | |||
question about cell reference in a formula | Excel Discussion (Misc queries) | |||
Match then lookup | Excel Worksheet Functions | |||
Formula Problem - interrupted by #VALUE! in other cells!? | Excel Worksheet Functions | |||
How do I set a cell value based on a formula in another cell? | Excel Discussion (Misc queries) |