Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy and paste up to values in last row | Excel Discussion (Misc queries) | |||
Copy & paste range | Excel Discussion (Misc queries) | |||
copy range and paste into every 3rd cell of new range | New Users to Excel | |||
Copy range in macro using paste special values | Excel Discussion (Misc queries) | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) |