K
kmf
I am using excel spreadsheets to track sales in a business. I enter sales
data each week onto a spreadsheet and wqs given the formula below to use so
it would
automatically be entered onto a invoice I created on a separate excel sheet.
I have used this vis basic code to do that:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "AP4" Then
Worksheets("$INV1").Range("$A$22").Value = _
Target.Value
End If
If Target.Address = "AP5" Then
Worksheets("$INV1").Range("$A$23").Value = _
Target.Value
I want to copy this so it works in in multiple columns that coreespond to
past or future weeks. I will have to repeat this many times because of
different time periods and different customers . does someone know how I can
repeat the code and have it change cells
automatically so i do not have to code every cell, just as excel works when
you copy from cell to cell it adjusts the cell address. thanks for any help.
I asked this question in 'programming' but do not understand the answer.
KMF
data each week onto a spreadsheet and wqs given the formula below to use so
it would
automatically be entered onto a invoice I created on a separate excel sheet.
I have used this vis basic code to do that:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "AP4" Then
Worksheets("$INV1").Range("$A$22").Value = _
Target.Value
End If
If Target.Address = "AP5" Then
Worksheets("$INV1").Range("$A$23").Value = _
Target.Value
I want to copy this so it works in in multiple columns that coreespond to
past or future weeks. I will have to repeat this many times because of
different time periods and different customers . does someone know how I can
repeat the code and have it change cells
automatically so i do not have to code every cell, just as excel works when
you copy from cell to cell it adjusts the cell address. thanks for any help.
I asked this question in 'programming' but do not understand the answer.
KMF