Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thankyou sharad & george
I am new to vis basic and I rewrote below what I am trying to accomplish. I wonder if someone could explain further. I rewrote below what I am trying to do. I am using excel spreadsheets to track sales in a business. I enter sales data each week onto a spreadsheet and was given the formula below to use so it would automatically be entered onto a invoice I created on a separate excel sheet. 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 or something that will work so it works in in multiple columns that correspond to past or future weeks. I will have to repeat this many times because of different time periods and different customers . In other words if I enter sales data for several products and several customers this week in several coulmns it would go to the invoice and I could print it print each one afer i entered the data for a particular customer. I want to keep the data I entered for historical reasons and want to enter next weeks data in a new column for that week, but it would still go to the same invoice form since after I print it and clear the values in the invoice for the next customer. So as i enter sales data each week in each new column I would like it to go to the same invoice form. Can i write a code or copy a vis basic formula that will take into account the new columns 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. KMF -- kmf |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi kmf
i have a sample workbook that allows you to create an invoice and store the information in a summary worksheet (as well as keep a copy of the invoice). If you would like a copy to see if it is useful to you please email me direct (julied_ng @ hcts dot net dot au) and i'll send it to you. Regards JulieD "kmf" wrote in message ... thankyou sharad & george I am new to vis basic and I rewrote below what I am trying to accomplish. I wonder if someone could explain further. I rewrote below what I am trying to do. I am using excel spreadsheets to track sales in a business. I enter sales data each week onto a spreadsheet and was given the formula below to use so it would automatically be entered onto a invoice I created on a separate excel sheet. 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 or something that will work so it works in in multiple columns that correspond to past or future weeks. I will have to repeat this many times because of different time periods and different customers . In other words if I enter sales data for several products and several customers this week in several coulmns it would go to the invoice and I could print it print each one afer i entered the data for a particular customer. I want to keep the data I entered for historical reasons and want to enter next weeks data in a new column for that week, but it would still go to the same invoice form since after I print it and clear the values in the invoice for the next customer. So as i enter sales data each week in each new column I would like it to go to the same invoice form. Can i write a code or copy a vis basic formula that will take into account the new columns 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. KMF -- kmf |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying multiple cells out of multiple worksheets at same time. | Excel Discussion (Misc queries) | |||
Problem with multiple copying of column contents | Excel Worksheet Functions | |||
Copying a column of single cells into a column of merged cells | Excel Discussion (Misc queries) | |||
Basic Excel for Macro Experts - replicating data across multiple cells | Excel Discussion (Misc queries) | |||
Copying 1 column into multiple columns | Excel Discussion (Misc queries) |