Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
kmf kmf is offline
external usenet poster
 
Posts: 5
Default copying vis basic formula in multiple column/cells

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default copying vis basic formula in multiple column/cells

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying multiple cells out of multiple worksheets at same time. tom Excel Discussion (Misc queries) 1 April 2nd 10 09:03 PM
Problem with multiple copying of column contents MichaelRobert Excel Worksheet Functions 2 October 28th 08 02:10 PM
Copying a column of single cells into a column of merged cells [email protected] Excel Discussion (Misc queries) 1 August 16th 06 01:18 PM
Basic Excel for Macro Experts - replicating data across multiple cells David Smithz Excel Discussion (Misc queries) 7 June 15th 06 01:11 PM
Copying 1 column into multiple columns Jshendel Excel Discussion (Misc queries) 2 May 4th 06 03:26 PM


All times are GMT +1. The time now is 03:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"