View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Simon Lloyd[_173_] Simon Lloyd[_173_] is offline
external usenet poster
 
Posts: 1
Default Enter a number on different cells automatically ?


If you find that you cannot use formula for some reason then here's a
VBA code version, it goes in the worksheet code module

*How to Save a Worksheet Event Macro*
1. *Copy* the macro using *CTRL+C* keys.
2. Open your Workbook and *Right Click* on the *Worksheet's Name Tab*
for the Worksheet the macro will run on.
3. *Left Click* on *View Code* in the pop up menu.
4. *Paste* the macro code using *CTRL+V*
5. Make any custom changes to the macro if needed at this time.
6. *Save* the macro in your Workbook using *CTRL+S*


Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
Select Case Range("A3").Value
Case Is < ""
Range("A6").Value = Range("A3").Value
Range("A9").Value = Range("A3").Value
Range("A12").Value = Range("A3").Value
Range("A15").Value = Range("A3").Value
Range("A18").Value = Range("A3").Value
Case Is = ""
Range("A6").Value = ""
Range("A9").Value = ""
Range("A12").Value = ""
Range("A15").Value = ""
Range("A18").Value = ""
End Select
End Sub


;305624 Wrote:
Hello,

I want to enter a number on different cells automatically. I want to
do this so I don't need to repeat the process again and again. I want
to enter a number on cell A3 and the same number will appear on cell
A6, A9, A12, A15 and A18 automatically. When I delete the number on
cell A3, the number will also dissapear from cell A6, A9, A12, A15 and
A18 automatically too.

Example Cell A3 2019

A6 2019

A9 2019

A12 2019

A15 2019

A18 2019

Thank You.



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (
http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=85458