+ Reply to Thread
Results 1 to 3 of 3

Function to refer to cell that contains it - NOT ActiveCell

  1. #1
    Registered User
    Join Date
    06-15-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question Function to refer to cell that contains it - NOT ActiveCell

    Hi,
    I'm trying to write a function that should search for a value in the first cell of the row in which the function is called,
    so to clarify:

    CELL G12: =FINDTEAMS() --> This is a public function I defined
    I'd like to be able to refer to CELL A12 in the public function, but without using the ActiveCell reference.
    The reason behind it is that I want to be able to update all the Cells in column G with formula =FINDTEAMS(),
    and when you do so, the ActiveCell doesn't change, always refers to original cell.

    I also want to indicate that I don't want to reference the current cell in the formula: =FINDTEAMS(G12),
    this to reduce the risk of human error.

    Any help would be greatly appreciated.
    Last edited by vandamo; 08-16-2013 at 09:43 AM.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Function to refer to cell that contains it - NOT ActiveCell

    pass the range to check as an argument to the function

    you can use application.thiscell but then you will have to make your function volatile
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    06-15-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Function to refer to cell that contains it - NOT ActiveCell

    Thanks,

    this is exactly what I was looking for.

    Cheers.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Possible to refer to the cell in which the function is inserted
    By yellowpower in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-11-2011, 10:33 AM
  2. Replies: 2
    Last Post: 10-21-2010, 04:41 AM
  3. IF Function - Refer the cell which is Blank by value but formula is there
    By acsishere in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-15-2008, 08:51 AM
  4. How to refer to the value of a cell containing a VBA function?
    By Bob at Great Waters in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2006, 08:20 PM

Tags for this Thread

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