Calculations & filtering data inside an array

Westbury

Board Regular
Joined
Jun 7, 2009
Messages
149
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
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,224,820
Messages
6,181,161
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top