Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In cell D30 I will enter a number. I would like for that number to appear
in cell M30 then have the word "Material" to appear in cell D30. Below is what I am trying to work with, but I always get "Material" in both D30 and M30. How do I fix this? Thanks, Phil Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$D$30" Then Range("M30") = Range("D30") Range("D30") = "Material" End If End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Frank. It works great.
Phil "Frank Kabel" wrote in message ... Hi You have to disable the worksheet events as otherwise your macro entry will trigger this event again. try Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$D$30" Then application.enableevents=false Range("M30").value = target.value Range("D30").value = "Material" End If application.enableevents=true End Sub -----Original Message----- In cell D30 I will enter a number. I would like for that number to appear in cell M30 then have the word "Material" to appear in cell D30. Below is what I am trying to work with, but I always get "Material" in both D30 and M30. How do I fix this? Thanks, Phil Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$D$30" Then Range("M30") = Range("D30") Range("D30") = "Material" End If End Sub . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to transfer contents of 'Selected' cell to alternate cell. | Excel Worksheet Functions | |||
Transfer cell values to another cell by selecting button. | Excel Worksheet Functions | |||
Transfer specific characters from cell to another cell. | New Users to Excel | |||
Transfer Cell Contents to Tab | Excel Discussion (Misc queries) | |||
Cell Transfer | Excel Programming |