Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default copy / paste values for certain range

I am trying to get a macro to work that will take what is
in cell D2 and copy it (as paste-special values) into the
rest of column D provided there is data in column E. In
other words, if the data in column E gos down to row 227 I
would like the value in D2 to be in D3 through D227 as
well. The only catch is the number of rows will vary each
time the macro gets run. I can not use the autofill since
that increments the value of D2 once for each row it
pastes to. Any ideas ?

Thanks !
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default copy / paste values for certain range

try this:

Sub fillDifE()
x = Range("e" & Rows.Count).End(xlUp).Row
Range("d2:d" & x).FillDown
End Sub


"Eric Dreshfield" wrote in message
...
I am trying to get a macro to work that will take what is
in cell D2 and copy it (as paste-special values) into the
rest of column D provided there is data in column E. In
other words, if the data in column E gos down to row 227 I
would like the value in D2 to be in D3 through D227 as
well. The only catch is the number of rows will vary each
time the macro gets run. I can not use the autofill since
that increments the value of D2 once for each row it
pastes to. Any ideas ?

Thanks !



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default copy / paste values for certain range

Thought it would. Glad to help.

"Eric Dreshfield" wrote in message
...
Don,

Thanks...that works like I had hoped ! I appreciate your
help !!

Eric
-----Original Message-----
try this:

Sub fillDifE()
x = Range("e" & Rows.Count).End(xlUp).Row
Range("d2:d" & x).FillDown
End Sub


"Eric Dreshfield" wrote in message
...
I am trying to get a macro to work that will take what

is
in cell D2 and copy it (as paste-special values) into

the
rest of column D provided there is data in column E. In
other words, if the data in column E gos down to row

227 I
would like the value in D2 to be in D3 through D227 as
well. The only catch is the number of rows will vary

each
time the macro gets run. I can not use the autofill

since
that increments the value of D2 once for each row it
pastes to. Any ideas ?

Thanks !



.



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 and paste up to values in last row Scott Excel Discussion (Misc queries) 2 September 23rd 09 10:23 PM
Copy & paste range nc Excel Discussion (Misc queries) 0 July 16th 09 06:58 PM
copy range and paste into every 3rd cell of new range thomsonpa New Users to Excel 4 December 3rd 07 01:47 PM
Copy range in macro using paste special values Jeff Excel Discussion (Misc queries) 2 August 20th 07 08:12 PM
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM


All times are GMT +1. The time now is 08:03 AM.

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"