Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default change cells on cell change


I have this code


Code:
--------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$b$3" Then
Sheets("Sheet2").Range("a1:a5") = Sheets("Sheet2").Range("b1:b5")
End If
End Sub
--------------------


When cell b3 is changed i want to replace what is in a1:a5 with what is
in b1:b5

any ideas?


--
nelsok
------------------------------------------------------------------------
nelsok's Profile: http://www.excelforum.com/member.php...o&userid=30682
View this thread: http://www.excelforum.com/showthread...hreadid=518072

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default change cells on cell change

nesok, Try putting your code in the WorkSheet_Change() event.

something like this (see below). This event fires when there has been change
in the Target address.
HTH , Rick


Private Sub Worksheet_Change(ByVal Target as Range)
If Target.Address = "$b$3" Then
Sheets("Sheet2").Range("a1:a5") = Sheets("Sheet2").Range("b1:b5")
End If
End Sub





"nelsok" wrote in
message ...

I have this code


Code:
--------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$b$3" Then
Sheets("Sheet2").Range("a1:a5") = Sheets("Sheet2").Range("b1:b5")
End If
End Sub
--------------------


When cell b3 is changed i want to replace what is in a1:a5 with what is
in b1:b5

any ideas?


--
nelsok
------------------------------------------------------------------------
nelsok's Profile:

http://www.excelforum.com/member.php...o&userid=30682
View this thread: http://www.excelforum.com/showthread...hreadid=518072



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change results , change data in othe cells across the row Jennifer1960 Excel Worksheet Functions 0 August 21st 06 10:37 PM
making copied cells change with change in original cell Jennifer Mcdermeit Excel Worksheet Functions 2 July 20th 06 04:58 PM
How do I change a number in one cell to change a series of cells? lance559 Excel Discussion (Misc queries) 2 January 13th 06 08:56 PM
change info in other cells when i change a number in a drop list? macbr549 Excel Discussion (Misc queries) 2 September 11th 05 02:07 AM
Can I change a cell and cause an automatic change in other cells Swissmiss Excel Worksheet Functions 2 August 12th 05 05:00 PM


All times are GMT +1. The time now is 11:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"