Fill the form with 10 rows

P

plumstone

I have 3 columns and each columns has 30 cells. Let's say they are in A1:C30. Now I want to copy them to a new table which has only 10 rows.
So I want to copy A1:C10 and paste them in D1:F10, A11:C20 to G1:I10, and A21:C30 to J1:L10.
Actually I have a huge database that have several hundreds records. Is there any shortcut to do this?
Thanks.
Plumstone
 
B

Biff

Hi Plumstone!

If this is something you do on a routine basis and the
ranges for the copy/paste operation are always the same,
the next time you do this, turn on the macro recorder and
create a macro. Then, in the future, just run that macro.

Biff
-----Original Message-----
I have 3 columns and each columns has 30 cells. Let's say
they are in A1:C30. Now I want to copy them to a new table
which has only 10 rows.
So I want to copy A1:C10 and paste them in D1:F10,
A11:C20 to G1:I10, and A21:C30 to J1:L10.
Actually I have a huge database that have several
hundreds records. Is there any shortcut to do this?
 
M

Mark E. PHilpot

Hi,

If you would like to send me some more info on what you
are really doing, I could (try to)write an Easy Task
Manager Form to make your job easier. It is free but It
really depends on the task at hand and what info you are
not telling.

Sometimes it is not necessary to copy and paste. With a
macro (vba), you can just write directly to the address
area.


visit
http://au.geocities.com/excelmarksway
for some samples.

regards
mark
-----Original Message-----
I have 3 columns and each columns has 30 cells. Let's say
they are in A1:C30. Now I want to copy them to a new table
which has only 10 rows.
So I want to copy A1:C10 and paste them in D1:F10,
A11:C20 to G1:I10, and A21:C30 to J1:L10.
Actually I have a huge database that have several
hundreds records. Is there any shortcut to do this?
 
P

plumstone

Hi Mark,
We have a database about our clients like this:
Name Acc.# Prefix
John 101 JSMI
Stacy 102 SMIL
Sam 103 CBAK
Every week we need to update the database because we may have new customers. We also need to print out forms sorted by name, Acc.# or Prop. Prefix. The printed form that sorted by Acc. # is going to be like this

Name Acc.# Prefix Name Acc.# Prefix Name Acc.# Prefix
John 101 JSMI Cesar 104 CESA Mel 107 MELD
Stacy 102 SMIL Betty 105 BETY Ruth 108 RTHC
Sam 103 CBAK Telly 106 TELK Ray 109 RYBT
It is going to by 56 rows per page, and there are 2 pages.
It is not a so big database, but I would like to find an easier way than just copy and paste every week.
Thanks.
Plumstone
 
B

Biff

Hi Plumstone!

No problem!

Since this is something you've never done before, I would
suggest that you create a copy of the file to practice
this operation on. I hope that doesn't sound ominious,
it's not intended to. Using a practice file gets you more
comfortable with doing something new and knowing that if
you "mess up" ... so what ... no harm done!!!

With the file open, goto the main menu.
Select Tools>Macro>Record New Macro
A dialogue box opens with several options. In the Macro
Name box, enter a name for your macro or you can just
accept the default name.
You can assign a hotkey combo that will run the macro.
There are several ways to run the macro and the hotkey is
just one of them. Other methods include creating a
clickable button on the sheet, going through the menus, or
creating a toolbar button.
In the store macro in box, the default is this workbook.
That means that the macro is stored in the current
workbook and is available in this workbook only. If you
select personal macro woorkbook the macro is stored in a
hidden file and is available to all workbooks.
If you want, you can enter descriptive info about the
macro.
Click Ok.
The macro recorder toolbar opens. At this point your
actions are being recorded. Just go about doing your
copy/paste operation as you normally would. When you're
done, click the blue dot button on the macro recorder
toolbar. That turns the recorder off.
That's it, you're done!

If you used a practice file just clear the cells where you
copy/pasted the data. Now, try running the macro.

To see what you have actually recorded, goto
Tools>Macro>Macros. Select the macro you just recorded and
click the edit button. The VBA editor opens and the code
created for your macro is displayed.

More than a few sentences, but this should get you started.

Good luck!
Biff
-----Original Message-----
Hi Biff,
Thanks. I didn't try to do a marcro before. But I will
try to learn it when I get time (hopefully I can get some
time this week). Is it possible to explain in just a few
sentences on how to do my marcro in this case? Forget
about it if it is to complicated to explain.
 
P

plumstone

Thanks a lot. I'll make a try.
:)

Biff said:
Hi Plumstone!

No problem!

Since this is something you've never done before, I would
suggest that you create a copy of the file to practice
this operation on. I hope that doesn't sound ominious,
it's not intended to. Using a practice file gets you more
comfortable with doing something new and knowing that if
you "mess up" ... so what ... no harm done!!!

With the file open, goto the main menu.
Select Tools>Macro>Record New Macro
A dialogue box opens with several options. In the Macro
Name box, enter a name for your macro or you can just
accept the default name.
You can assign a hotkey combo that will run the macro.
There are several ways to run the macro and the hotkey is
just one of them. Other methods include creating a
clickable button on the sheet, going through the menus, or
creating a toolbar button.
In the store macro in box, the default is this workbook.
That means that the macro is stored in the current
workbook and is available in this workbook only. If you
select personal macro woorkbook the macro is stored in a
hidden file and is available to all workbooks.
If you want, you can enter descriptive info about the
macro.
Click Ok.
The macro recorder toolbar opens. At this point your
actions are being recorded. Just go about doing your
copy/paste operation as you normally would. When you're
done, click the blue dot button on the macro recorder
toolbar. That turns the recorder off.
That's it, you're done!

If you used a practice file just clear the cells where you
copy/pasted the data. Now, try running the macro.

To see what you have actually recorded, goto
Tools>Macro>Macros. Select the macro you just recorded and
click the edit button. The VBA editor opens and the code
created for your macro is displayed.

More than a few sentences, but this should get you started.

Good luck!
Biff

try to learn it when I get time (hopefully I can get some
time this week). Is it possible to explain in just a few
sentences on how to do my marcro in this case? Forget
about it if it is to complicated to explain.
 
P

plumstone

HI Biff,
Thanks a lot! I've got it. This is going to save a lot of my time in the future.
Plumstone :)
 
Top