ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Copy cell contents with VB (https://www.excelbanter.com/excel-discussion-misc-queries/237569-copy-cell-contents-vbulletin.html)

TheMilkGuy

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

Don Guillett

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



TheMilkGuy

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



TheMilkGuy

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



TheMilkGuy

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



Don Guillett

Copy cell contents with VB
 
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



TheMilkGuy

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




All times are GMT +1. The time now is 02:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com