I have geographic data in a spreadsheet, cols A to J and many rows. Cols H & I contain decimal latitude and longitude. I know how to read this data into an array but would like to know the efficent way of of performing calulations and filtering the data inside the array.
I already have an equation to calculate distances from a fixed point for each of the rows [using the lat and long] but need to
1) "add" an extra column to the array to accommodate this result for each row
2) to filter the results to exclude rows where the distance is < X and >Y
3) to add a further "column" to the array to accommadate the compass bearing of the fixed point to the point identified in each row. (which is a separate problem as the equation uses MOD(Atan2.... which doesn't seem to work in VBA)
I know how to do the calculations but would appreciate some advice on how to use the array for these needs.
Thanks
Geoff
I already have an equation to calculate distances from a fixed point for each of the rows [using the lat and long] but need to
1) "add" an extra column to the array to accommodate this result for each row
2) to filter the results to exclude rows where the distance is < X and >Y
3) to add a further "column" to the array to accommadate the compass bearing of the fixed point to the point identified in each row. (which is a separate problem as the equation uses MOD(Atan2.... which doesn't seem to work in VBA)
I know how to do the calculations but would appreciate some advice on how to use the array for these needs.
Thanks
Geoff