hi
ive been looking at this problem and ive encountered something i don't understand. The formulae im using on sheet 3 are to pull records from sheet2 based on a payment method of cash or cheque using find( to verify the entries in
col b of sheet2 (the "meth" range). To get more flexibility i created a udf to check the payment methods (fstr). Im using this in one cell (b5) on sheet3. The others on sheet three use the find function. The return value in b5 is
wrong because there is a difference in the way the array filtering operates with the two functions and yet the data being passed looks exactly the same.
There are two arrays of 30 elements
meth array
true = cell value either "cash" or "cheque"
false if not as above
row numbers array {1 to 30}
an if statement matches the true line numbers. The false ones are ignored.
Now - with the find function the matching is one for one between the two arrays, returning 30 elements, but line 1 is false and so the small function returns 2 ("cheque") which is correct.
With the fstr udf it seems to be matching every line with every element in the meth array, so 1 is returned which is wrong. Bearing in mind that the data appears identical in evaluate formula
i cant understand whats causing this and how to correct it.
I know i can just leave the find in there, but the udf will provide more functionality, and i would like to understand this. Id appreciate any help.