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
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Do you?!
Code:
Function CalcIt(ByVal x As Variant)
CalcIt = Application.Caller.Column & Cells(Application.Caller.Row, 1)
End Function
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,021
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top