ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   COPY MACRO (https://www.excelbanter.com/excel-programming/286892-copy-macro.html)

PCOR

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



Jase

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


.


Don Guillett[_4_]

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





Don Guillett[_4_]

COPY MACRO
 
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







PCOR

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









Don Guillett[_4_]

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
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











PCOR

COPY MACRO
 
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













Don Guillett[_4_]

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
















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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com