![]() |
array UDF not recalculating correctly
I have a UDF that uses Yahoo! API to geocode an address (i.e. return a
standardized street, city, zip code, and lat lon coordinates) where the address is held in cells A1:D1 (address, city, state, zip) and the function is entered array-style into 8 column (single row) range because I'm returning 8 data pieces from the XML document returned by the query (standarized address, city, state, zip, lat, lon,etc). It works great if I do as described above, it returns the individual 8 pieces into the cells that the function is entered in. When I recalculate, however, the cells containing the function all contain only the first piece of the 8 data pieces that they should (in this case, the address is repeated across the 8 cells). I can select the cells, and again enter with CTRL-SHIFT-ENTER, and it will work properly again. I am wondering if anyone has clues as to how to get all the cells in the array to return the correct values after re-calculation. I have tried all combinations of F9 relcalculaton, I have tried "application.volatile" in the UDF, neither has helped. Thanks for any ideas, Dave. |
array UDF not recalculating correctly
If I do msgbox a, or msgbox reason, I can see that the correct value is
there. However these lines are not populating the array correctly unless I go in and press ctrl-shift-enter again. rv(1, 1) = a rv(1, 2) = c rv(1, 3) = s rv(1, 4) = z rv(1, 5) = lat rv(1, 6) = lon rv(1, 7) = acc rv(1, 8) = reason geocodeArray = rv |
array UDF not recalculating correctly
|
All times are GMT +1. The time now is 01:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com