CDXRadius Function
Previous  Top  Next


For a general overview of how to insert data and functions into your worksheet, please refer to the topic Inserting Data and Functions.

CDXRadius is a right-click function that returns a list of ZIP Codes located within a radius of given ZIP Code. It is available in some versions of CDXZipStream. 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.)

This function will work with Canadian postal codes, if you have purchased the Canadian data option.

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:

radius1

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 radius or driving time maps created into the worksheet. These are created using the MapPoint, Basic, and Premium versions of CDXZipStream. Please refer to the topic Insert MapPoint Maps for more information.

Maximum Rows - if the data is returned as an array, the maximum number of rows of data you wish to return, up to one million. Note that there are approximately 42K U.S. ZIP codes and 850K Canadian postal codes.

Database - for those who have purchased the Canadian database option, you can specify U.S., Canadian, or both U.S. and Canadian codes be included in the radius results.

For the inputs shown above, 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 maximum 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:

radius2

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 distance from the specified ZIP Code) separated by a "|" :

radius3

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.)

radius4

Select this cell, then drag the cursor over the range of cells which will contain the returned array:

radius5

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:

radius6

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. However, you can copy any part and paste it to another area of your worksheet.