![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 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?
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, Colorado USA
Posts: 4,014
|
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.
__________________
Keep Excelling. Damon VBAexpert Excel Consulting (My other life: http://damonostrander.com ) |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|