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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

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:

Forum statistics

Threads
1,089,193
Messages
5,406,732
Members
403,104
Latest member
mkirchner

This Week's Hot Topics

Top