Thousands of lines of data, can this be done?

TheJay

Active Member
Joined
Nov 12, 2014
Messages
364
Office Version
  1. 2019
Platform
  1. Windows
Hello there, I am wondering whether there is a way to ask Excel to check all the data and identify where there are gaps between numbers and if there are, insert the correct number of cells in between and add their values.

The sheet has data in cells A:L. The data to sort is in A and B. Everything else in the other columns is text. A contains a three digit code, B contains numbers ranging that are five digits long (some with leading zeros). At the moment I am working through it manually to locate missing numbers in a sequence and then insert the correct number of rows and the corresponding numbers in B.

If the number is 16001 in B, it will be 016 in A. This is important in terms of filling in the gaps in columns A and B.

So, as an example

017​
17031​
017​
17033​

I located a missing row. The action to take is insert a new row, add 017 to column A and 17032 to column B.

It's a little bit more complicated because there are intentional gaps between some numbers.

For example

024​
24062​
025​
25001​

In these instances, it would need to check column A first to make sure it doesn't fill in the gaps from 24062 to 25001.

Does anyone have any ideas?

Thanks.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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