Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Update during sort, calls functions that refer to ranges bei

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #2
    MrExcel MVP Damon Ostrander's Avatar
    Join Date
    Feb 2002
    Location
    Denver, Colorado USA
    Posts
    4,239
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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
    LinkedIn Profile http://www.linkedin.com/pub/damon-ostrander/7/79/a93
    AllExperts Profile http://www.allexperts.com/ep/1059-30...-Ostrander.htm

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •