I've been there... The trick is that you can't look for the exact value that you have, and you can't decrease it to refine because you're not looking for you're current value but your total one.
Eg: (that I did right now to check it sill works) I have about 99k gems. I know I spent quite a few but no more than let's say 100k. (actually way way less) I launch a search for 99000~199000 (i could have search closer) and get, obvioulsy, too many results. I gain 3 gems with the add. I refine (N=O+D with value 3) and tadaam, only 3 results left in this case (you mileage can vary) One is my current number, so I don't tooch that, one seems too big (and doesn't fit the pattern*), and the last one fits perfectly. I change it, move rooms and my level of gems changes. That's all
addendums: if you still have too many values, try to count the max of gems you may have spend and round it a bit up and search around the final value (I knew the final number was around 100k for me, I could have searched 95000~105000 for better results)
Also wait to have gained a few gems, do a n=o+d on that, move stuff around, refine with "unchanged value", do the add thing, repeat with "unchanged value"... Even if you have like 20 resusts you can easily remove manually mosts of them trough pattern.
What I mean by fitting or not the pattern, and I speak as someone no understanding at all what I'm doing (so I can't explain the why at all) is that all the value we change in hogward mystery look like this:
value that I want to change
0
Big value
0
Big value (that I want to change to valueX8 )
_________________________________________________
BTW if someone better versed in this stuff can explain me WHY that is, why we add a X8 or why we only change this and that value, I'd be grateful. ^^