Re: Embedded formulas vs. Macro Loop
Derk, the code works great. It has effectively the same runtime as having the formula in every cell, but still the advantage of the smaller file size. I ran it on a few of my data sets, comparing ur version to the other, and the results came back the exact same, for all 25k+ pts in each set.
I was wondering, for my benefit, if you could explain how the match function operates, or the role of the 1/-1. Does this just choose direction of the search (up/down)? Also, does it choose the closest value in the range that is less than it? ex: if you have 9.9, and ur table has 9,10,11, how does it pick the range 9-10 as opposed to the 10-11? Is this a part of the match function, or something else im missing? Im also a little unclear on the role of the "n". It looks like this is in there so if the last entry in the range is selected, it wont compute a result because it doesnt have the other end of the range to interpolate between? If the data is outside the range, the current function just picks the end value of the table, which i would like to replicate (Do this by substituting Interp = YVals(n) for Interp = "Error"?).
Once again, i appreciate all the help and i appologize for all my questions.