+ Reply to Thread
Results 1 to 3 of 3

Identify the Book, Sheet, and Range/Cell of the cell in which a function is called

  1. #1
    Registered User
    Join Date
    02-10-2013
    Location
    Frankfurt, Germany
    MS-Off Ver
    Excel 2003
    Posts
    57

    Identify the Book, Sheet, and Range/Cell of the cell in which a function is called

    Hi,

    I'm trying to write a function for worksheet use that will search through every single in cell in all open books and return the name of the book that matches the supplied value. However, the problem is that the function will always attempt to search the cell that it's called from, resulting in a circular reference. Is there a way to make the search skip over the cell that it was called from? Or alternatively, can I just have it skip over the workbook that the function is in?

    Please Login or Register  to view this content.
    Many thanks!

  2. #2
    Registered User
    Join Date
    05-14-2020
    Location
    Mauritius
    MS-Off Ver
    Office 365
    Posts
    97

    Re: Identify the Book, Sheet, and Range/Cell of the cell in which a function is called

    Hi Monkihunta,

    Try this:
    Please Login or Register  to view this content.
    Greetings

    Tor


  3. #3
    Registered User
    Join Date
    02-10-2013
    Location
    Frankfurt, Germany
    MS-Off Ver
    Excel 2003
    Posts
    57

    Re: Identify the Book, Sheet, and Range/Cell of the cell in which a function is called

    Hi,

    Many thanks for the suggestion, that would certainly work in most instances, however, my function will probably live in an addin, so it returns the wrong workbook.

    I've discovered an ugly solution: Have the function require a range variable, then take the workbook name from the range variable. It's a bit cumbersome, but it'll do for now.

    If anyone has a better solution, I'd be keen to hear it.

    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. Replies: 1
    Last Post: 07-23-2010, 04:03 PM
  2. Range VBA function have a way to identify cell co-ordinates
    By JohnSidney in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-10-2010, 01:47 PM
  3. From which cell is my VBA function called ?
    By Helge V. Larsen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-15-2006, 08:35 AM
  4. [SOLVED] Need to know what cell called the custom VBA function?
    By partyOfOne in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-19-2005, 01:05 PM
  5. [SOLVED] How do I copy a function with a called cell constant?
    By MitchCarter1957 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2005, 11:05 PM
  6. [SOLVED] How do I copy a function with a called cell constant?
    By MitchCarter1957 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 09:05 PM
  7. [SOLVED] Find out which cell that called my function
    By Anders in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-14-2005, 07:05 AM
  8. Finding the cell a function is called from
    By Aljrob in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-15-2005, 07:35 AM

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