Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Help Looping form generation from spreadsheet list

Hello everybody,

I have a moderate understanding of excel and macro creation but
nothing to the level I believe I would need to do what I need. Once a
month I have to generate labels (in the form of a 1-page printout) for
a number of customers I have been filling them out by hand in the
past, but was wondering if it would be possible to make an excell
macro to do it for me. An independent file for each label by customer
must also be generated for my records.

My spreadsheet of itemized orders looks as follows

Name Pick Up Loc Delivery Loc Date Item
A A1 A2
A3 ItemA1
A A1 A2
A3 ItemA2
A A1 A2
A3 ItemA3
B B1 B2
B3 ItemB1

and so on, my list is well over 1000 rows. There is no limit or
pattern to the number of independent items an individual could have
ordered.

With my limited knowledge of programing, I would imagine something
like the following would need to take place.

For (Spreadsheet) Do until no more data

For -NAME- Do until -NEW CONTENTS IN NAME-

Create a new form from file (Form template.xls);

Take all data cells and copy them into appropriate cells on a form
including name;

Copy each equipment into its own cell in a vertical sequence of
cells on the form;

Save the form to (Labels directory) as (*Name*.xls);

Close the form;

End

End

Can anyone help me with this? Is it even possible in excell?

Many thanks.

Ryan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Help Looping form generation from spreadsheet list

http://www.rondebruin.nl/copy5.htm

--
Regards,
Tom Ogilvy


"JokerFrowns" wrote:

Hello everybody,

I have a moderate understanding of excel and macro creation but
nothing to the level I believe I would need to do what I need. Once a
month I have to generate labels (in the form of a 1-page printout) for
a number of customers I have been filling them out by hand in the
past, but was wondering if it would be possible to make an excell
macro to do it for me. An independent file for each label by customer
must also be generated for my records.

My spreadsheet of itemized orders looks as follows

Name Pick Up Loc Delivery Loc Date Item
A A1 A2
A3 ItemA1
A A1 A2
A3 ItemA2
A A1 A2
A3 ItemA3
B B1 B2
B3 ItemB1

and so on, my list is well over 1000 rows. There is no limit or
pattern to the number of independent items an individual could have
ordered.

With my limited knowledge of programing, I would imagine something
like the following would need to take place.

For (Spreadsheet) Do until no more data

For -NAME- Do until -NEW CONTENTS IN NAME-

Create a new form from file (Form template.xls);

Take all data cells and copy them into appropriate cells on a form
including name;

Copy each equipment into its own cell in a vertical sequence of
cells on the form;

Save the form to (Labels directory) as (*Name*.xls);

Close the form;

End

End

Can anyone help me with this? Is it even possible in excell?

Many thanks.

Ryan


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Help Looping form generation from spreadsheet list

Thanks, I will look into this.

I may not have mentioned but my label form does not match (cell/column/
header references) my source data spreadsheet (as Ron states it
should). Also I don't believe I have the savey to loop this process
within my needs. I am quite new to VB code within excel and was
wondering if anyone had coded a loop like this before and had it
available otherwise I fear it would take me less time to simply fill
in the forms by hand than learn complex coding loops...

Thanks,

Ryan

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Help Looping form generation from spreadsheet list

In Ron's example I am trying to work away at a solution, but I keep
getting stuck on this line, what do I need to "change"

Set ws1 = Sheets("Sheet1") '<<< Change

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Help Looping form generation from spreadsheet list

You would replace "sheet1" with the name of a sheet. I don't know where it
is used in the specific code you have selected to work with, so I can't say
whether it is the name of the sheet containing the original data or the name
of the sheet where you are placing a subset of the data matching a particular
key value.

--
Regards,
Tom Ogilvy


"JokerFrowns" wrote:

In Ron's example I am trying to work away at a solution, but I keep
getting stuck on this line, what do I need to "change"

Set ws1 = Sheets("Sheet1") '<<< Change




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Help Looping form generation from spreadsheet list

Read this

Name of the worksheet with your data table
Set ws1 = Sheets("Sheet1") '<<< Change



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JokerFrowns" wrote in message ups.com...
In Ron's example I am trying to work away at a solution, but I keep
getting stuck on this line, what do I need to "change"

Set ws1 = Sheets("Sheet1") '<<< Change

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Help Looping form generation from spreadsheet list

On May 31, 3:20 pm, JokerFrowns wrote:
In Ron's example I am trying to work away at a solution, but I keep
getting stuck on this line, what do I need to "change"

Set ws1 = Sheets("Sheet1") '<<< Change


Alright, I have gotten it to successfully split my data list into one
list per client, however I still have absolutely no idea how to make
it into a format to match cell reference to data form and save
appropriately.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Help Looping form generation from spreadsheet list

In Ron's example I am trying to work away at a solution, but I keep
getting stuck on this line, what do I need to "change"

Set ws1 = Sheets("Sheet1") '<<< Change

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Help Looping form generation from spreadsheet list

What's the name of the sheet that contains the data?

Say it's "My Data" (without the double quotes), then you'd use:

set ws1 = sheets("My Data")



JokerFrowns wrote:

In Ron's example I am trying to work away at a solution, but I keep
getting stuck on this line, what do I need to "change"

Set ws1 = Sheets("Sheet1") '<<< Change


--

Dave Peterson
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
Excel List Generation jrthomas Excel Worksheet Functions 0 July 24th 07 03:46 PM
Using data form in large mailing list spreadsheet JW Excel Discussion (Misc queries) 1 September 19th 06 07:28 PM
Dynamic List Generation wmureports Excel Programming 3 July 26th 06 09:20 PM
Random List Generation carl Excel Worksheet Functions 4 May 23rd 06 02:18 PM
Automatic List Generation JerryS Excel Worksheet Functions 8 March 15th 06 07:01 PM


All times are GMT +1. The time now is 11:43 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"