Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 186
Default Paste cell to last row in range

i'm trying to copy a formula from E1 to a range of cells in column c from row
2 to the lastrow in the column. Here is my code

Sub Test
dim lastrow
application.goto reference:="r65536c1"
selection.end(xlup).select
lastrow = activecell.row

range ("E1").select
selection.copy
set myrange = range(cells(2,"c"), cells(lastrow, "c"))
myrange.paste

the macro stops at the "myrange.paste"

Jack
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,549
Default Paste cell to last row in range


set myrange = Range(Cells(2,"c"), Cells(lastrow, "c"))
Range("E1").Copy myrange
--
Jim Cone
Portland, Oregon USA




"Jack"
wrote in message
i'm trying to copy a formula from E1 to a range of cells in column c from row
2 to the lastrow in the column. Here is my code

Sub Test
dim lastrow
application.goto reference:="r65536c1"
selection.end(xlup).select
lastrow = activecell.row

range ("E1").select
selection.copy
set myrange = range(cells(2,"c"), cells(lastrow, "c"))
myrange.paste

the macro stops at the "myrange.paste"
Jack
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 186
Default Paste cell to last row in range

Thanks that did the trick.

with this command i have pasted a formula into the range i would now like to
copy and paste back as a value. could you also help with that.

Jack

"Jim Cone" wrote:


set myrange = Range(Cells(2,"c"), Cells(lastrow, "c"))
Range("E1").Copy myrange
--
Jim Cone
Portland, Oregon USA




"Jack"
wrote in message
i'm trying to copy a formula from E1 to a range of cells in column c from row
2 to the lastrow in the column. Here is my code

Sub Test
dim lastrow
application.goto reference:="r65536c1"
selection.end(xlup).select
lastrow = activecell.row

range ("E1").select
selection.copy
set myrange = range(cells(2,"c"), cells(lastrow, "c"))
myrange.paste

the macro stops at the "myrange.paste"
Jack

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,549
Default Paste cell to last row in range

Jack,
Range("E1").Value = myrange.Value
--
Jim Cone
Portland, Oregon USA



"Jack"
wrote in message
Thanks that did the trick.
with this command i have pasted a formula into the range i would now like to
copy and paste back as a value. could you also help with that.
Jack




"Jim Cone" wrote:
set myrange = Range(Cells(2,"c"), Cells(lastrow, "c"))
Range("E1").Copy myrange
--
Jim Cone
Portland, Oregon USA




"Jack"
wrote in message
i'm trying to copy a formula from E1 to a range of cells in column c from row
2 to the lastrow in the column. Here is my code

Sub Test
dim lastrow
application.goto reference:="r65536c1"
selection.end(xlup).select
lastrow = activecell.row

range ("E1").select
selection.copy
set myrange = range(cells(2,"c"), cells(lastrow, "c"))
myrange.paste

the macro stops at the "myrange.paste"
Jack

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 186
Default Paste cell to last row in range

Jim

i'm sorry i wasn't clear

in e1 i have the formula =($a1&$b1) which was copied into
column c2 to c last row with the first code you provided
Now i want to change the formulas in c2 to c lastrow to values

"Jim Cone" wrote:

Jack,
Range("E1").Value = myrange.Value
--
Jim Cone
Portland, Oregon USA



"Jack"
wrote in message
Thanks that did the trick.
with this command i have pasted a formula into the range i would now like to
copy and paste back as a value. could you also help with that.
Jack




"Jim Cone" wrote:
set myrange = Range(Cells(2,"c"), Cells(lastrow, "c"))
Range("E1").Copy myrange
--
Jim Cone
Portland, Oregon USA




"Jack"
wrote in message
i'm trying to copy a formula from E1 to a range of cells in column c from row
2 to the lastrow in the column. Here is my code

Sub Test
dim lastrow
application.goto reference:="r65536c1"
selection.end(xlup).select
lastrow = activecell.row

range ("E1").select
selection.copy
set myrange = range(cells(2,"c"), cells(lastrow, "c"))
myrange.paste

the macro stops at the "myrange.paste"
Jack




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,549
Default Paste cell to last row in range

Jack,
And I was mixed up...
myrange.Value = myrange.Value
--
Jim Cone
Portland, Oregon USA




"Jack"
wrote in message
Jim
i'm sorry i wasn't clear
in e1 i have the formula =($a1&$b1) which was copied into
column c2 to c last row with the first code you provided
Now i want to change the formulas in c2 to c lastrow to values

"Jim Cone" wrote:

Jack,
Range("E1").Value = myrange.Value
--
Jim Cone
Portland, Oregon USA



"Jack"
wrote in message
Thanks that did the trick.
with this command i have pasted a formula into the range i would now like to
copy and paste back as a value. could you also help with that.
Jack




"Jim Cone" wrote:
set myrange = Range(Cells(2,"c"), Cells(lastrow, "c"))
Range("E1").Copy myrange
--
Jim Cone
Portland, Oregon USA




"Jack"
wrote in message
i'm trying to copy a formula from E1 to a range of cells in column c from row
2 to the lastrow in the column. Here is my code

Sub Test
dim lastrow
application.goto reference:="r65536c1"
selection.end(xlup).select
lastrow = activecell.row

range ("E1").select
selection.copy
set myrange = range(cells(2,"c"), cells(lastrow, "c"))
myrange.paste

the macro stops at the "myrange.paste"
Jack


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 186
Default Paste cell to last row in range

Jim
Thanks alot - this worked perfectly

"Jim Cone" wrote:

Jack,
And I was mixed up...
myrange.Value = myrange.Value
--
Jim Cone
Portland, Oregon USA




"Jack"
wrote in message
Jim
i'm sorry i wasn't clear
in e1 i have the formula =($a1&$b1) which was copied into
column c2 to c last row with the first code you provided
Now i want to change the formulas in c2 to c lastrow to values

"Jim Cone" wrote:

Jack,
Range("E1").Value = myrange.Value
--
Jim Cone
Portland, Oregon USA



"Jack"
wrote in message
Thanks that did the trick.
with this command i have pasted a formula into the range i would now like to
copy and paste back as a value. could you also help with that.
Jack




"Jim Cone" wrote:
set myrange = Range(Cells(2,"c"), Cells(lastrow, "c"))
Range("E1").Copy myrange
--
Jim Cone
Portland, Oregon USA




"Jack"
wrote in message
i'm trying to copy a formula from E1 to a range of cells in column c from row
2 to the lastrow in the column. Here is my code

Sub Test
dim lastrow
application.goto reference:="r65536c1"
selection.end(xlup).select
lastrow = activecell.row

range ("E1").select
selection.copy
set myrange = range(cells(2,"c"), cells(lastrow, "c"))
myrange.paste

the macro stops at the "myrange.paste"
Jack



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
copy range and paste into every 3rd cell of new range thomsonpa New Users to Excel 4 December 3rd 07 02:47 PM
how do I paste range name list? Adesso Excel Worksheet Functions 2 January 20th 07 11:22 AM
How do I copy the contents of a range of text cells and paste into one cell? davfin Excel Discussion (Misc queries) 7 July 4th 06 08:16 AM
Paste a named range to another range in Excel David Jean Excel Discussion (Misc queries) 2 April 13th 05 02:02 PM
Paste Link enters a 0 into the cell where I paste. How do I elemin UNR Excel Discussion (Misc queries) 4 March 28th 05 01:54 AM


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