+ Reply to Thread
Results 1 to 3 of 3

Changing the contents of a cell in a range, controlled from a separate cell

  1. #1
    Registered User
    Join Date
    11-13-2008
    Location
    The Netherlands
    Posts
    21

    Changing the contents of a cell in a range, controlled from a separate cell

    In cell B1 = 60 (number)
    The range A1:A100 is filled with 0
    I need a formula or function which changes the contents of A60 into e.g. 1
    (the argument 60 in A60 comes from B1)
    When the contents of cell B1 is changed from 60 to let us say 30 then A60 must be 0 again and A30 must be 1.

    Does a formula or VBA code exist which can do this for me?

    your help will be appreciated

    Gerhard

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Changing the contents of a cell in a range, controlled from a separate cell

    Here is one approach. Right-click on the worksheet tab, View Code and paste this in. It will update when you change B1:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-13-2008
    Location
    The Netherlands
    Posts
    21

    Re: Changing the contents of a cell in a range, controlled from a separate cell

    Your code works perfectly when I change the contents of B1 manually.
    However in cell B1 is a formula which gets its information to change the value from a differt cell.
    I tested by entering in cell B1 the formula =+C1
    When I change the contents of C1, cell B1 changes accordingly but nothing happens to range A1:A100. Can you advise an alternative approach please?

+ 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