Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Detecting "CallingCell" In Function

Function who_called_me()
who_called_me = ""
MsgBox (Application.Caller.Address)
End Function

--
Gary's Student


"dec_obrien" wrote:


Hi,
I have a custom function that calculates the Date given various
conditions. What I want to do is conditionally format the cell from
where the function is called based on the day of the week calculated.
It's like "ActiveCell" for the calling cell of the function but
obviously ActiveCell will not be correct. I know I could pass the Cell
Row/ Column in as arguments to teh function but this seems a bit messy
if there an easier way of detecting this.

Any ideas?


--
dec_obrien
------------------------------------------------------------------------
dec_obrien's Profile: http://www.excelforum.com/member.php...o&userid=37705
View this thread: http://www.excelforum.com/showthread...hreadid=572994


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Detecting "CallingCell" In Function


Thanks guys, Application.Caller.Address gets teh address of the cell but
it won't change the format of the cell.


--
dec_obrien
------------------------------------------------------------------------
dec_obrien's Profile: http://www.excelforum.com/member.php...o&userid=37705
View this thread: http://www.excelforum.com/showthread...hreadid=572994

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Detecting "CallingCell" In Function

Correct.
Not possible with a worksheet function.

NickHK

"dec_obrien" wrote
in message ...

Thanks guys, Application.Caller.Address gets teh address of the cell but
it won't change the format of the cell.


--
dec_obrien
------------------------------------------------------------------------
dec_obrien's Profile:

http://www.excelforum.com/member.php...o&userid=37705
View this thread: http://www.excelforum.com/showthread...hreadid=572994



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text "comparison" operator for "contains" used in an "IF" Function Pawaso Excel Worksheet Functions 4 April 4th 23 11:35 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Detecting "CallingCell" In Function Bob Phillips Excel Programming 0 August 18th 06 10:25 AM
Detecting if a value "fits" in a cell. Robert Mulroney[_3_] Excel Programming 10 November 15th 05 10:20 PM
Please add a "sheet" function like "row" and "column" functions Spreadsheet Monkey Excel Programming 2 November 8th 05 04:08 PM


All times are GMT +1. The time now is 04:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"