Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
bottom borders in a For Loop
Newbie here, hope you can help
snippet of code below - it puts the subtotal in col c and works good However I also want a bottom border line to go across col B thru G ONLY on the suttotal line I know others may write the code differently but this is my first attempt. Just looking for a line or so that will hopefully do the trick Any help appreciated - Thanks Chris Dim rng As Range, code As Variant Dim i As Integer Dim qty As Integer Set rng = Range("b4:b50") code = Range("b4").Value For i = 1 To rng.Count If code < rng.Cells(i).Value Then code = rng.Cells(i).Value rng.Cells(i).Offset(-1, 2).Value = qty qty = rng.Cells(i).Offset(0, 1).Value b c d e f g code amt subtotal a 23 a 5 28 b 6 b 66 b 58 130 c 9 c 14 23 d 48 d 45 d 8 d 95 196 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loop a range from bottom up | Excel Programming | |||
dislike jump bottom of column by double-clicking the bottom of cel | Excel Discussion (Misc queries) | |||
Advancing outer Loop Based on criteria of inner loop | Excel Programming | |||
Problem adding charts using Do-Loop Until loop | Excel Programming | |||
how to paste data from top to bottom to bottom to top | Excel Discussion (Misc queries) |