+ Reply to Thread
Results 1 to 2 of 2

change cells on cell change

  1. #1
    Registered User
    Join Date
    01-20-2006
    Posts
    3

    change cells on cell change

    I have this code

    Please Login or Register  to view this content.
    When cell b3 is changed i want to replace what is in a1:a5 with what is in b1:b5

    any ideas?

  2. #2
    Rick Hansen
    Guest

    Re: 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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1