Make named formula volatile ?

Jaafar Tribak

Well-known Member
Joined
Dec 5, 2002
Messages
9,806
Office Version
  1. 2016
Platform
  1. Windows
Hi.

I have defined a named formula namely HasComment which returns TRUE if the cell has a comment and which refers to the following XML function :
=GET.CELL(46)
When I enter the named formula in a cell it works but it is not volatile .
I have tried linking it to the Now() Function as follows :
=OR(GET.CELL(46),NOW()*0)
But it is still not volatile and I still have to select the cell and press F2 to update it.

Any thoughts ?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
How about making the cell volatile? =AND(HasComment,NOW())
 
Upvote 0
How about something like this. It isn't a volatile function, it uses a non-volatile function with the entire sheet as its precedent.

=IF(ROWS(1:65536)>0, GET.CELL(46, A1), )

Another problem was that the second argument of GET.CELL was not specified.
 
Upvote 0
Wow thanks - both solutions work perfectly !

Mike .
why is that the ROWS Function seems to force an update while Now doesn't ? They are both volatile though.

DK.
Nice link and nice use of the INDIRECT function - I'll take a closer look at the link - I am sure the info will be very useful .
 
Upvote 0
How about making the cell volatile? =AND(HasComment,NOW())

Sorry jason I didn't see your answer.

That works as well but I wanted to know why having the NOW volatile function inside the named formula didn't work. - Thanks
 
Upvote 0
Upvote 0
I noticed that, but didn't realise the relevance until you mentioned it, thanks for making me look again.

Always thought that with no range specified it defaulted to Application.Caller, not ActiveCell.

That's what I thought as well.

I still wish to know why the Rows always evaluates to TRUE and therefore forces an update of the named formula whereas the NOW function doesn't !
 
Upvote 0
It isn't a volatile function, it uses a non-volatile function with the entire sheet as its precedent.

Maybe Mike can elaborate a little more, it would appear that with defined names, only the active cell is volatile.
 
Upvote 0
"why is that the ROWS Function seems to force an update while Now doesn't ? They are both volatile though."

ROWS doesn't force an update.
The recalc only happens when one of the precedent cells is changed. Since the argument of ROWS is 1:65536, every cell on the sheet is a precedent cell. COUNTA(1:65536) or SUM(1:65536) would work as well as ROWS, except that putting them in a cell would cause a circular reference
The reason for using ROWS is that it allows a circular reference without causing an error.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,289
Members
452,902
Latest member
Knuddeluff

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