Find Any File containing a UK National Insurance Number

Chris Waller

Board Regular
Joined
Jan 18, 2009
Messages
183
Office Version
  1. 365
Platform
  1. Windows
Morning All,

I am after a small favour. Is it possible to create a procedure using Excel 2010 that would search through our folders\directories and list any file that contains data in the format of a National Insurance Number i.e. AANNNNNNA the first 2 digits are alpha characters followed by 6 numbers 0-9 followed by another alpha character. We have been advised to delete any that we find, but the problem is trying to find them in the first instance. TIA
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
To check every cell of spreadsheet (17,179,869,184 of them since Excel 2007 came out, and that's just one worksheet) to do what you want it will need to look at every cell, to establish if their is data to check in that cell.

This Would assuming the macro is efficient enough to check each cell in One Second, take somewhere close to 544 Days per worksheet

Excel is probably not the weapon of choice here!

Manual Labour may well be more efficient, the human eye can spot an empty space and disregard it much quicker
 
Upvote 0
GJSBED

Thanks for the info. I may have to rethink what I am trying to do.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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