I need to modify my macro ...

D

Dr. Darrell

I have a macrco which fills in a table which will be used to create a
Run-Chart. When I have filled values into a worksheet, I click a Forms Button
and the data is recorded in several cells, (L3:R3).

When I enter new values into the worksheet and hit the button again I would
like the data to be filled into the next row of cells, (L4:R4), and
subsequently (L5:R5), (L6:r6) etc.

How do I change the address to enter the data each time the form button is
clicked.

My code is as follows:

Sub SaveRunChartData_101_4900_30Deg()
'
' SaveRunChartData_101_4900_30Deg Macro
' Macro recorded 2/24/2010 by Darrell.Roak
'

'
Range("L3").Select
ActiveCell.FormulaR1C1 = "=R[4]C[-7]"
Range("M3").Select
ActiveCell.FormulaR1C1 = "=R[4]C[-6]"
Range("N3").Select
ActiveCell.FormulaR1C1 = "=R[33]C[-8]"
Range("O3").Select
ActiveCell.FormulaR1C1 = "=R[12]C[-10]"
Range("P3").Select
ActiveCell.FormulaR1C1 = "=R[21]C[-11]"
Range("Q3").Select
ActiveCell.FormulaR1C1 = "=R[28]C[-12]"
Range("R3").Select
ActiveCell.FormulaR1C1 = "=R[31]C[-12]"
Range("L4").Select
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

I'd like to modify mt Macro ... 9
Macro 3
Macro to change information 0
Change data with a macro 8
Macro to shift 3
Modify range in VBA 9
Macro Flexability 7
Creating Pivot Table with Macro using Multiple Sheets 0

Top