# Results Don't Maintain Row After Sorting

**URL:** <https://forums.eveonline.com/t/results-dont-maintain-row-after-sorting/475214>\
**Category:** EVE x Microsoft Excel Add-in\
**Created:** [January 27, 2025, 10:58pm UTC](https://forums.eveonline.com/t/results-dont-maintain-row-after-sorting/475214 "2025-01-27T22:58:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bear\_Templar](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/bear_templar/32/519843_2.png) [@Bear\_Templar](https://forums.eveonline.com/u/Bear_Templar)\
**Post date:** [January 27, 2025, 10:58pm UTC](https://forums.eveonline.com/t/results-dont-maintain-row-after-sorting/475214/1 "2025-01-27T22:58:03Z")

</div>

I am encountering an issue whereby results are not maintaining their row after sorting. I have tested this with both two functions for obtaining prices for both min sell and max buy (note that the below are only examples for min sell).

=MIN(EVEONLINE.MARKET\_ORDERS().price)  
and  
=EVEONLINE.MARKET\_ORDERS\_STATS.sell.min

Initial table looks like this and is correct - this was set up when the TypeIDs were in order:

 ![image](https://global.discourse-cdn.com/eveonline/original/4X/0/4/0/040977c88c8e3570c2ddf5416d99425f419f2b62.png)

However, when sorting by name, I get the following:

 ![image](https://global.discourse-cdn.com/eveonline/original/4X/f/f/3/ff3c5ca38c32f6e351d0c31d71f126d5dc832875.png)

Notice how the prices are now misaligned with the wrong item.

Once i sort back by TypeID, the results return back to the correct row.

Weirdly, i have these functions on another sheet but have not encountered the issue there.

Any advice, solutions, or workarounds?

Thanks.  
Bear

---

<div class="post-metadata">

**Author:** ![Hundasuupa](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/hundasuupa/32/412082_2.png) [@Hundasuupa](https://forums.eveonline.com/u/Hundasuupa)\
**Post date:** [February 3, 2025, 8:41am UTC](https://forums.eveonline.com/t/results-dont-maintain-row-after-sorting/475214/2 "2025-02-03T08:41:58Z")

</div>

There is a bug when using the built in simple table sorting and referencing cells outside the current sheet. (is your region\_id, location\_id somewhere else).  
Doing so will mess up the order when sorting so the columns aren’t pointing to the correct relative cell.

Not sure if the last user to encounter this found a fix for it, but I remember I manged to reproduce it and it was reproducable without the addin. So sadly there is nothing the addin can do, it’s more of an excel bug.

edit: the bug appears also when referencing a current sheet using Sheet1!A1 type of reference. When A1 works

---

<div class="post-metadata">

**Author:** ![Bear\_Templar](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/bear_templar/32/519843_2.png) [@Bear\_Templar](https://forums.eveonline.com/u/Bear_Templar)\
**Post date:** [February 5, 2025, 9:47am UTC](https://forums.eveonline.com/t/results-dont-maintain-row-after-sorting/475214/3 "2025-02-05T09:47:23Z")

</div>

Ah ok, that’s good to know.

And you are correct - my region\_id and station\_id values are on another sheet. I’ll hard-code them into the formula and test.

It also explains why I am not encountering the same issue on the other sheet - it’s because they are referencing the item\_id of the row within the same sheet.

Thanks for your response!

---

<div class="post-metadata">

**Author:** ![Hundasuupa](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/hundasuupa/32/412082_2.png) [@Hundasuupa](https://forums.eveonline.com/u/Hundasuupa)\
**Post date:** [February 5, 2025, 10:46am UTC](https://forums.eveonline.com/t/results-dont-maintain-row-after-sorting/475214/4 "2025-02-05T10:46:26Z")

</div>

Good to hear I managed to guess the issue. 😃

I’ve got a small update on the bug report, since I just got word from Microsoft yesterday.

This issue is quite old, and appears in Excel 2021 and thus it’s a potentially breaking change that might mess up existing sheets. So we won’t be getting any patch to fix the behaviour.  
Hopefully you’ll be able to work around it! 🙏

---

<div class="post-metadata">

**Author:** ![Bear\_Templar](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/bear_templar/32/519843_2.png) [@Bear\_Templar](https://forums.eveonline.com/u/Bear_Templar)\
**Post date:** [February 5, 2025, 5:31pm UTC](https://forums.eveonline.com/t/results-dont-maintain-row-after-sorting/475214/5 "2025-02-05T17:31:10Z")

</div>

I must have missed your edit and so when I hard-coded the id values the error was still present.

As your message was about sheet names - and my formula had the current sheet name for the item\_id part - I thought “perhaps it breaks with all sheet names”.

Sure enough, after removing the sheet name and just leaving the cell reference it worked!

I came back to announce my findings but this time saw your edit lol

Again thanks for your help @Hundasuupa

I have another question though - each time i open the document, it doesn’t automatically refresh the Eve formulas. Things like item prices, system manufacturing/reaction indexes etc. Do you know a way of doing that? Currently I re-sort columns and it those formulas get re-initiated but wondering if there’s another way.

Ty!

---

<div class="post-metadata">

**Author:** ![Hundasuupa](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/hundasuupa/32/412082_2.png) [@Hundasuupa](https://forums.eveonline.com/u/Hundasuupa)\
**Post date:** [February 7, 2025, 7:06pm UTC](https://forums.eveonline.com/t/results-dont-maintain-row-after-sorting/475214/6 "2025-02-07T19:06:52Z")

</div>

Happy to help!

For refreshing formulas there is a shortcut to recalculate all cells, CTRL + ALT + F9.

F9 and different alt keys for more specific refreshing (I only got the refresh all version to work).

It used to refresh on startup but for performance reason they turned that off. It was crushing for large large sheets to fire all the requests off at once, so it makes sense. Kinda wish the addin sidebar had a button that would refresh all cells. 😃

Some people use control cells to update only certain parts, but that’s done by IF wrapping around the formulas based on a true/false dropdown list cell. Nothing overly complicated but helps if for example you just wanna do price updates, but not fetch static looking data, or recalculate something that’s cached for 1 hour anyways.
