CDXRadius is a right-click function that returns a list of zip codes located within a radius of given zip code. It can be employed as a right-click function as well as input directly into your worksheet as a custom function formula. (Please also refer to the help section on custom functions.) With Basic and higher versions of CDXZipStream, this function can embed radius or drive time maps into your worksheet. If you have purchased the Canadian postal code database, you can also use it for radius analysis of postal codes.
Please refer to the Youtube video Find Addresses within a Radius for a quick demonstration of CDXRadius and how it can be used to filter large address lists.
To use as a right-click function, right-click on any cell in a worksheet, select the Insert CDXRadius Function, and you will see the input box shown below:
The following inputs are required:
Zip Code - the specified zip code that represents the center of the region of interest. You may use the actual zip code (such as "06830") or the worksheet cell location of the zip code ("C4").
Radius - the maximum distance from the specified zip code
Distance Unit - the radius can be specified in miles, kilometers, or nautical miles
Result Output - the returned list of zip codes (and their distance from the specified zip code) can be returned as an array formula within a range of cells, or as a single string contained within one cell. You can also specify to embed a radius map created with MapPoint into an Excel worksheet as part of the Basic and Premium versions of CDXZipStream. This feature is not available with the "Lite" version of CDXZipStream. In addition, you have the option (with Basic and higher versions) to obtain a drive-time radius map; these maps display polygons delineating the area within a specific drive time of the zip code.
Returned Rows - if the data is returned as an array, the number of rows that will contain the returned zip codes.
If you have purchased the Canadian postal code database, you can also specify the database to be for the United States, Canada, or both.
For example, if we use the following inputs:
The result is a list of zip codes (starting at the right-clicked cell in the worksheet) located within a three-mile radius of 06830. Each zip code is listed along with its distance from 06830. Since the number of returned rows is 10, and only six zip codes meet the criteria of being within 3 miles, the remaining four rows do not contain any data:
If a string output is selected, the same data is returned in a single string within the right-clicked cell, with data pairs (zip code and distances from the specified zip code) separated by a "|" :
The CDXRadius function can also be directly input as a custom function formula in the following generalized form:
=CDXRadius(Zip Code, Radius, Distance Unit, Result Output)
For the example immediately above, the custom function formula would be:
=CDXRadius("06830", 3, "M" ,1)
"M" specifies that the distance values are all in miles. Alternatively, you can specify "KM" for kilometers or "NM" for nautical miles. The Result Output is specified as 1, indicating that the data will be returned in a single string.
If the Result Output value is omitted, the Data will be returned to an array within a range of cells. For this case use the following procedure:
Enter the custom function formula in the desired cell:
(Note: Since the Distance Unit is also omitted here, it is assumed all distance values will be in miles.)
Select this cell, then drag the cursor over the range of cells which will contain the returned array:
Click on the formula bar (which should contain the custom function formula), and depress the keys CTRL-SHIFT-ENTER simultaneously. The returned array will appear in the selected range:
There is a new set of brackets automatically inserted around the formulas in each selected cell, which Excel uses to indicate this is a member of an array. You may not delete or move just part of the array - the entire array must be deleted or moved, if desired.