Identify the first cell (starting cell) and the last cell End Cell) in multiple numeric ranges from one column and display the results in a separate column.
Figure-5.png
I have several spreadsheets containing tens of thousands of rows of sequential numeric postal codes that span a few columns. I have been trying to simplify how this data is processed so that I can greatly reduce the amount of keystrokes I have to enter through out the project.
Column A contains a complete list of sequential numeric postal codes.
Column B contains unique codes that can be found in Column A. I have already figured out how to arrange each unique value so that they line up with the identical value in column A. The result is a series of ranges (Point #6)
Column C is where I am stumped and require assistance.
For simplicity I have included a screen shot which has been edited to point to certain requirements (Please excuse the fact that it starts with Point #6, I have been able to solve the first 5 points already.)
For each numeric range created in column B, I need to identify the first and last cell and display the results in the same row but in Column C. (Red Boxes in Column C) I must also follow these following guidelines.
Point #7 - The cells between each numeric range must remain blank.
Point #8 - Ranges that have only one cell only require one cell to function as both the START and
STOP cells for that particular range.
Point #9 - Ranges that have two cells require only the display of the START and STOP cells in Column
C.
Point #10 - If the ranges contain 3 or more cells then the cells between the START and STOP cells in
Column C must remain blank.
I need to write a formula that I can copy/paste down the length of Column C that will accomplish this task and save me from time consuming manual entry of the data.
I need to have these particular START and STOP cells identified because my next task is to turn each range into Regular Expressions (RegEx) displayed in Column D in the row containing the STOP cell. (Any help on accomplishing that would be greatly appreciated as well)
Thank you in advance![]()
Bookmarks