Page 1 of 1

Excel macro

Posted: Sat Jun 18, 2005 10:49 am
by thewolfe
Excel macro

A friend has a spread sheet he receives every week. He has to copy info from that sheet and past it into a new Excel sheet in a different order and then save the new sheet as a "prn" file.

He wants to create a macro (or two) that will do as much of the following as possible.

The following cells are always the same.

He wants to copy the following cells and then paste each cell area below the previously pasted cell area with one blank cell between each cell area.

The "pasted" info is then saved as a "prn" file.

Here's the cell info he's coping.

D7-F18
D21-F32
H7-J18
H21-J32
L7-N18
L21-N32

I can create a macro but this is out of my league.
Questions? Solutions?

Posted: Sat Jun 18, 2005 6:29 pm
by CDN_Merlin
Isn't a macro just a simple script that does exactly what you do? Like have him start recording, then do the steps in order of what he wants and then stop the macro and save it.

Posted: Sat Jun 18, 2005 6:39 pm
by thewolfe
I believe one of the problems is you can only copy one cell area at a time.

Posted: Sat Jun 18, 2005 6:57 pm
by snoopy
Well, it would make for a long recording... but why not do it all one at a time- once the macro is recorded it'll all happen so fast he won't be able to tell the difference, it will just take a while...

Posted: Sat Jun 18, 2005 7:21 pm
by thewolfe
See above

Posted: Sat Jun 18, 2005 7:47 pm
by fliptw
guh. too lazy to do the work?

you only have to record it ONCE.

but anyways, you could just insert the rows first, then copy it.

Posted: Sat Jun 18, 2005 9:24 pm
by thewolfe
Sorry I don't understand. Record what once?

Insert the (what) rows first then copy it(Where)?

Posted: Sat Jun 18, 2005 10:01 pm
by DCrazy
You can hit the Record button, do all the manipulation, then hit the Stop Recording button and save it as a macro. Done.

Posted: Sun Jun 19, 2005 5:10 am
by CDN_Merlin
Start recordgin the macro.

do all the steps required for what he needs, copy, paste, move, add etc. Then stop the macro and name it.

Next time he needs it, open the spreadsheet and run that macro and it will get down within seconds.

Posted: Sun Jun 19, 2005 8:22 am
by thewolfe
As I have stated before, it is my understanding that you can only copy one cell area at a time.

If you copy one cell area and go to the next cell area and copy it, it only saves the last copied cell area. So....you can't hit Record, go through coping 6 different cell areas and then go to another sheet, paste them and click stop.