Posted by Rob on August 01, 2001 1:30 PM
This code was given to me by Quarlton, but needs a button to be executed. Is there a way to modify this code to have it evaluate as i input data, and without a button? Thanks, heres the code:
'find last row of data
LastRow = ActiveCell.SpecialCells(xlLastCell).Row
Do While Selection.Row < LastRow + 1
If Selection <> "" Then
Selection.Borders(xlEdgeLeft).LineStyle = xlContinuous
Selection.Borders(xlEdgeTop).LineStyle = xlContinuous
Selection.Borders(xlEdgeBottom).LineStyle = xlContinuous
Selection.Borders(xlEdgeRight).LineStyle = xlContinuous
Selection.Font.Bold = True
'add formula to "C"
Selection.Offset(0, 2).FormulaR1C1 = "=RC[-2]+RC[-1]"
'move down one row