Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy cell contents with VB
Hi folks. I should start by saying that I understand VB on a
kindergarten level. :) I have a column (A15 to A25) that I would like to repeat the input from A15 all the way down to A25. However, if I change the value at A20 I would like that new value to continue to A25. Sound do-able? If so, many many thanks!! Craig |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy cell contents with VB
Right click sheet tabview codecopy paste this. Now when you change any
cell in a15 or below the value will goto all cells below it to row 25 Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("a15:a25")) Is Nothing Then Exit Sub Application.EnableEvents = False Range(Cells(Target.Row, "a"), Cells(25, "a")).Value = Target Application.EnableEvents = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "TheMilkGuy" wrote in message ... Hi folks. I should start by saying that I understand VB on a kindergarten level. :) I have a column (A15 to A25) that I would like to repeat the input from A15 all the way down to A25. However, if I change the value at A20 I would like that new value to continue to A25. Sound do-able? If so, many many thanks!! Craig |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy cell contents with VB
Don,
Thanks for the quick reply, but I'm getting an "Ambiguous name detected: Worksheet_Change" error. Any suggestions? Thanks, Craig On Jul 21, 2:52*pm, "Don Guillett" wrote: Right click sheet tabview codecopy paste this. Now when you change any cell in a15 or below the value will goto all cells below it to row 25 Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("a15:a25")) Is Nothing Then Exit Sub Application.EnableEvents = False Range(Cells(Target.Row, "a"), Cells(25, "a")).Value = Target Application.EnableEvents = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "TheMilkGuy" wrote in message ... Hi folks. *I should start by saying that I understand VB on a kindergarten level. *:) I have a column (A15 to A25) that I would like to repeat the input from A15 all the way down to A25. However, if I change the value at A20 I would like that new value to continue to A25. Sound do-able? *If so, many many thanks!! Craig |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy cell contents with VB
Disregard! Thanks Don, I just put your formula in with one I got from
this group earlier today for time conversion. All's well. Appreciate your help! Cheers, Craig On Jul 21, 5:15*pm, TheMilkGuy wrote: Don, Thanks for the quick reply, but I'm getting an "Ambiguous name detected: *Worksheet_Change" error. Any suggestions? Thanks, Craig On Jul 21, 2:52*pm, "Don Guillett" wrote: Right click sheet tabview codecopy paste this. Now when you change any cell in a15 or below the value will goto all cells below it to row 25 Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("a15:a25")) Is Nothing Then Exit Sub Application.EnableEvents = False Range(Cells(Target.Row, "a"), Cells(25, "a")).Value = Target Application.EnableEvents = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "TheMilkGuy" wrote in message .... Hi folks. *I should start by saying that I understand VB on a kindergarten level. *:) I have a column (A15 to A25) that I would like to repeat the input from A15 all the way down to A25. However, if I change the value at A20 I would like that new value to continue to A25. Sound do-able? *If so, many many thanks!! Craig |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy cell contents with VB
Ugh - at the risk of hijacking my own thread... ;)
Here is your formula Don, modified for my worksheet: If Intersect(Target, Range("D19:D27")) Is Nothing Then Exit Sub Application.EnableEvents = False Range(Cells(Target.Row, "D"), Cells(27, "D")).Value = Target Application.EnableEvents = True How can I modify this to do the exact same job on the E19:E27 range? Like D19, I want E19 to start the flow. I have tried several methods with no luck. Thanks, <insert sheepish grin here Craig On Jul 21, 5:29*pm, TheMilkGuy wrote: Disregard! *Thanks Don, I just put your formula in with one I got from this group earlier today for time conversion. All's well. *Appreciate your help! Cheers, Craig On Jul 21, 5:15*pm, TheMilkGuy wrote: Don, Thanks for the quick reply, but I'm getting an "Ambiguous name detected: *Worksheet_Change" error. Any suggestions? Thanks, Craig On Jul 21, 2:52*pm, "Don Guillett" wrote: Right click sheet tabview codecopy paste this. Now when you change any cell in a15 or below the value will goto all cells below it to row 25 Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("a15:a25")) Is Nothing Then Exit Sub Application.EnableEvents = False Range(Cells(Target.Row, "a"), Cells(25, "a")).Value = Target Application.EnableEvents = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "TheMilkGuy" wrote in message .... Hi folks. *I should start by saying that I understand VB on a kindergarten level. *:) I have a column (A15 to A25) that I would like to repeat the input from A15 all the way down to A25. However, if I change the value at A20 I would like that new value to continue to A25. Sound do-able? *If so, many many thanks!! Craig |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy cell contents with VB
Wow... outstanding.
Thanks a million, Don! Craig On Jul 21, 7:20*pm, "Don Guillett" wrote: If not Intersect(Target, Range("D19:D27")) Is Nothing Then Application.EnableEvents = False Range(Cells(Target.Row, "D"), Cells(27, "D")).Value = Target Application.EnableEvents = True end if If not Intersect(Target, Range("e19:e27")) Is Nothing Then Application.EnableEvents = False Range(Cells(Target.Row, "e"), Cells(27, "e")).Value = Target Application.EnableEvents = True end if -- Don Guillett Microsoft MVP Excel SalesAid Software "TheMilkGuy" wrote in message ... Ugh - at the risk of hijacking my own thread... *;) Here is your formula Don, modified for my worksheet: If Intersect(Target, Range("D19:D27")) Is Nothing Then Exit Sub Application.EnableEvents = False Range(Cells(Target.Row, "D"), Cells(27, "D")).Value = Target Application.EnableEvents = True How can I modify this to do the exact same job on the E19:E27 range? Like D19, I want E19 to start the flow. I have tried several methods with no luck. Thanks, <insert sheepish grin here Craig On Jul 21, 5:29 pm, TheMilkGuy wrote: Disregard! Thanks Don, I just put your formula in with one I got from this group earlier today for time conversion. All's well. Appreciate your help! Cheers, Craig On Jul 21, 5:15 pm, TheMilkGuy wrote: Don, Thanks for the quick reply, but I'm getting an "Ambiguous name detected: Worksheet_Change" error. Any suggestions? Thanks, Craig On Jul 21, 2:52 pm, "Don Guillett" wrote: Right click sheet tabview codecopy paste this. Now when you change any cell in a15 or below the value will goto all cells below it to row 25 Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("a15:a25")) Is Nothing Then Exit Sub Application.EnableEvents = False Range(Cells(Target.Row, "a"), Cells(25, "a")).Value = Target Application.EnableEvents = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "TheMilkGuy" wrote in message ... Hi folks. I should start by saying that I understand VB on a kindergarten level. :) I have a column (A15 to A25) that I would like to repeat the input from A15 all the way down to A25. However, if I change the value at A20 I would like that new value to continue to A25. Sound do-able? If so, many many thanks!! Craig |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to copy the contents from last cell | Excel Discussion (Misc queries) | |||
copy cell value not contents | Excel Discussion (Misc queries) | |||
Data entry - Copy contents of cell typed in one cell to another ce | Excel Worksheet Functions | |||
Cut and paste or Copy just cell contents? | Excel Discussion (Misc queries) | |||
how do I copy the contents of a cell from one workbook to another | Excel Worksheet Functions |