+ Reply to Thread
Results 1 to 4 of 4

Function is changing surrounding cells.

  1. #1
    Registered User
    Join Date
    03-19-2012
    Location
    Houston
    MS-Off Ver
    Excel 2007
    Posts
    3

    Function is changing surrounding cells.

    Just learning. There is something fundamental I am misunderstanding here. Trying to search down the active column for explicitly entered "arriving" and "leaving" cells and fill in the blanks. This is a simplified special case for the top cells in a column. The cells below the top look up one row and assign a value based on that "previous" row's entry. The whole thing works, but calling the function from one cell changes other cells with that function.

    Please Login or Register  to view this content.
    Thank you.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Function is changing surrounding cells.

    I think that you need to show the code that calls that function.

  3. #3
    Registered User
    Join Date
    03-19-2012
    Location
    Houston
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Function is changing surrounding cells.

    Quote Originally Posted by Bob Phillips View Post
    I think that you need to show the code that calls that function.
    Here it is:
    Please Login or Register  to view this content.
    Again, I may have some fundamental understanding of how this is supposed to work.

  4. #4
    Registered User
    Join Date
    03-19-2012
    Location
    Houston
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Function is changing surrounding cells.

    Quote Originally Posted by OnErrorGoto0 View Post
    Your problem is this line:
    You should replace Activecell with Application.Caller and make the function volatile. I'm not sure what the point of the argument you pass is?
    Thank you!

    This is only a special case for the top row. The other rows use the argument. Skipping the argument and using Offset(0,-1) worked, but the sells didn't automatically update. I'm still learning.

+ 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