Application.ThisCell and CalculateFullRebuild

wellynjp

New Member
Joined
Apr 27, 2019
Messages
2
I have been having some trouble using Application.ThisCell and need some help. To explain the issue, I created some simple code.

There are two workbooks. In each one, I have the following UDF in a module.

Function CalcIt(ByVal x As Variant)
CalcIt = Application.ThisCell.Column & Cells(Application.ThisCell.Row, 1)
End Function

In Workbook1, cell A1 = "Apple" and B1 = CalcIt(A1)

In Workbook2, cell A1 = "Orange" and B1 = CalcIt(A1)

Each workbook works correctly by showing "2Apple" in Workbook1 and "2Orange" in Workbook2 in cell B1, except when I do a CalculateFullRebuild (SHIFT+CTRL+ALT+F9). If I do it in Workbook1, the incorrect value is shown in Workbook2 (and vice versa). Can someone please explain why this happens?

Also, why can't I do a simple calculation (F9) or for the workbook (SHIFT+F9) to re-calculate?

Thanks for you help - Wellyn
 

Some videos you may like

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

sadboy309

Board Regular
Joined
Oct 15, 2014
Messages
88
Do you?!
Code:
Function CalcIt(ByVal x As Variant)
CalcIt = Application.Caller.Column & Cells(Application.Caller.Row, 1)
End Function
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,090,109
Messages
5,412,469
Members
403,428
Latest member
ldmcd

This Week's Hot Topics

Top