#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default COPY MACRO


I would like a macro to copy data from sheet 1 to a new book
the macro would copy col A to I inclusive and down to include the last row-
The last row varies all the time...and that is where I am having trouble.
Will someone please help
Thanks

--
Norton Professional 2004 says this email is clean...believe it


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default COPY MACRO

sub memacro
workbooks.add
thisworkbook.sheets("sheet1").range("A2:I65536").c opy
range("A1").pastespecial paste:=xlvalues
end sub

not sure if this will work as I just guessed and typed it
into here without checking first.

You should workout how to do record macros as they are
definately helpfull at getting you started

Jase
-----Original Message-----

I would like a macro to copy data from sheet 1 to a

new book
the macro would copy col A to I inclusive and down to

include the last row-
The last row varies all the time...and that is where I am

having trouble.
Will someone please help
Thanks

--
Norton Professional 2004 says this email is

clean...believe it


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default COPY MACRO

You should always copy/paste your code to here so we will know you are
making an effort. Please do NOT attach a workbook.

--
Don Guillett
SalesAid Software

"PCOR" wrote in message
ers.com...

I would like a macro to copy data from sheet 1 to a new book
the macro would copy col A to I inclusive and down to include the last

row-
The last row varies all the time...and that is where I am having trouble.
Will someone please help
Thanks

--
Norton Professional 2004 says this email is clean...believe it




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default COPY MACRO

Would you please show mw a macro that would do as requested and show that
line
Thanks

"Don Guillett" wrote in message
...
One way to get the next available row to use in your macro:

nar=cells(rows.count,"a").end(xldown).row+1

Guillett
alesAid Software

"Don Guillett" wrote in message
...
You should always copy/paste your code to here so we will know you are
making an effort. Please do NOT attach a workbook.

--
Don Guillett
SalesAid Software

"PCOR" wrote in message
ers.com...

I would like a macro to copy data from sheet 1 to a new book
the macro would copy col A to I inclusive and down to include the last

row-
The last row varies all the time...and that is where I am having

trouble.
Will someone please help
Thanks

--
Norton Professional 2004 says this email is clean...believe it










  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default COPY MACRO

You didn't indicate that in the OP
The last row varies all the time...and that is where I am having trouble.

indicated that you did have code but were having a problem determining the
last row. Didn't I give you one solution to determine the last row?
try something like this. Modify to suit

nar=worksheets("sheet2").cells(rows.count,"a").end (xldown).row+1
range(cells(activecell.row,"a"),cells(activecell.r ow,"H")).copy _
worksheets("sheet2").cells(nar,"a")

--
Don Guillett
SalesAid Software

"PCOR" wrote in message
able.rogers.com...
With all due respect...if I had code to cut and paste, I would not be

asking
here.
I apperciate your help

"Don Guillett" wrote in message
...
You should always copy/paste your code to here so we will know you

are
making an effort. Please do NOT attach a workbook.



--
Don Guillett
SalesAid Software

"PCOR" wrote in message
gers.com...
Would you please show mw a macro that would do as requested and show

that
line
Thanks

"Don Guillett" wrote in message
...
One way to get the next available row to use in your macro:

nar=cells(rows.count,"a").end(xldown).row+1

Guillett
alesAid Software

"Don Guillett" wrote in message
...
You should always copy/paste your code to here so we will know you

are
making an effort. Please do NOT attach a workbook.

--
Don Guillett
SalesAid Software

"PCOR" wrote in message
ers.com...

I would like a macro to copy data from sheet 1 to a new book
the macro would copy col A to I inclusive and down to include

the
last
row-
The last row varies all the time...and that is where I am having
trouble.
Will someone please help
Thanks

--
Norton Professional 2004 says this email is clean...believe it














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
If macro to copy a row GeorgeA Excel Discussion (Misc queries) 1 June 22nd 09 04:16 PM
Copy workbook, don't copy macro CongroGrey Excel Discussion (Misc queries) 1 June 13th 08 04:56 PM
macro copy Pammy Excel Discussion (Misc queries) 1 April 28th 07 03:48 PM
I need a macro that can copy Paul Excel Programming 1 September 14th 03 11:01 PM


All times are GMT +1. The time now is 05:09 PM.

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

About Us

"It's about Microsoft Excel"