Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using excel spreadsheets to build a account system for a business. I
want to enter sales data each week onto a spreadsheet and have it automatically entered onto a invoice on a separate 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 since I have to repeat this many times because there are fifty two weeks in a year, does someone know how I can repeat the code and have it change cells automatically so i do not have to code every cell, justas excel works when you copy from cell to cell it adjusts the cell address. thanks for any help KMF |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is Visual Basic the same as Visual Studio 2008? | Excel Worksheet Functions | |||
New to Visual Basic | Excel Discussion (Misc queries) | |||
visual basic | Excel Discussion (Misc queries) | |||
Visual Basic | Excel Discussion (Misc queries) | |||
changing the visual basic in office 2003 to visual studio net | Excel Discussion (Misc queries) |