I can't follow the problem or the discussion so far, but just in case it's relevant I find that using @IF functions is useful; for example to extract positive values from a long list of negative and positive values, and then get a total of positive values, I use @IF(d4>0,d4,0), which creates a column of positive values and zeros, so that Autosum works for the total. The zeros can be hidden.
@IF can be used for all sorts of analyses; a text string works just as well as a number within the argument. For example, we use it to extract addresses with a particular post code from a database. When combined with a macro it can be very powerful.