Update during sort, calls functions that refer to ranges bei

sreed

New Member
Joined
Apr 21, 2002
Messages
3
I have a user defined VBA function that references named ranges in a worksheet. If a cell in the sheet calls the function, this function will be called when I sort the worksheet, but the ranges seem to be incompletely defined (because they are being sorted, I guess). Why isn't the update of the cell delayed until the sort is complete? Is there a workaround or redesign for this?
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi sreed,

If I understand your question, you are wondering why you (i.e., your worksheet functions) can't see the intermediate states that occur in the sorting process.

The reason for this is that Excel sorts the data internally in temporary memory rather than directly in the worksheet cells. This way it can use a much more efficient method of sorting in which it only has to put the sort keys in order, and then puts all the records (rows) in same sorted order as the final step. In addition, this avoids a lot of screen updating overhead.

I hope this is answering the question you are asking.
 
Upvote 0

Forum statistics

Threads
1,213,501
Messages
6,114,010
Members
448,543
Latest member
MartinLarkin

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