Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I believe this question has been answered previously, but I can't easily
locate the answer. I wish to copy cell value "Y2" to cells Y3 downward to the last row where a value exists in column X. Any suggestions? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this one for "Sheet1"
Sub test() With Worksheets("Sheet1") Set SourceRange = .Range("Y2") Set fillRange = .Range("Y2:Y" & .Cells(Rows.Count, "X").End(xlUp).Row) End With SourceRange.AutoFill Destination:=fillRange End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Eric_G" wrote in message ... I believe this question has been answered previously, but I can't easily locate the answer. I wish to copy cell value "Y2" to cells Y3 downward to the last row where a value exists in column X. Any suggestions? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Sub copydown() LastRowX = Cells(Rows.Count, "X").End(xlUp).Row Set pasterange = Range(Cells(3, "Y"), Cells(LastRowX, "Y")) Range("Y2").Copy Destination:=pasterange End Sub "Eric_G" wrote: I believe this question has been answered previously, but I can't easily locate the answer. I wish to copy cell value "Y2" to cells Y3 downward to the last row where a value exists in column X. Any suggestions? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Than you both -- worked fine.
"Joel" wrote: Sub copydown() LastRowX = Cells(Rows.Count, "X").End(xlUp).Row Set pasterange = Range(Cells(3, "Y"), Cells(LastRowX, "Y")) Range("Y2").Copy Destination:=pasterange End Sub "Eric_G" wrote: I believe this question has been answered previously, but I can't easily locate the answer. I wish to copy cell value "Y2" to cells Y3 downward to the last row where a value exists in column X. Any suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy a range with known start column to variable end column | Excel Programming | |||
Copy column range of "single word" cells with spaces to a single c | Excel Discussion (Misc queries) | |||
How to use macros to copy a range of cells which can exclude some cells which I didn't want to be copied? | Excel Worksheet Functions | |||
Copy cells into range of cells until cell change | Excel Worksheet Functions | |||
Copy a formula to a range of cells via VB6 using .Range(Cells(row,col), Cells(row,col)).Formula= statement | Excel Programming |