dellehurley
Board Regular
- Joined
- Sep 26, 2009
- Messages
- 171
- Office Version
- 365
- Platform
- Windows
Hi
This is a little hard to explain but here goes.
I have a large database which contains details about associated files. The database generates the new file name and part of that file name is a number. Currently there are a lot of missing numbers and gaps. I want excel to use VBA to find the smallest number in the sequence that has not already been used and place that in a textbox on a userform.
I have found this Youtube video and it is sort of doing what I want too, except I need the answer to populate a text box on a userform and be dynamic. This is a link to it Mr Excel & excelisfun Trick 103: Find Missing Numbers In A Series
This is an example of the database. The File No. column is the number I want to generate. The same file name maybe duplicated several times if the file relates to several people eg PMa0452.jpg in table above. But the number should only be used once otherwise. The file number is always 4 digits.
Many Thanks for your help.
Dannielle
This is a little hard to explain but here goes.
I have a large database which contains details about associated files. The database generates the new file name and part of that file name is a number. Currently there are a lot of missing numbers and gaps. I want excel to use VBA to find the smallest number in the sequence that has not already been used and place that in a textbox on a userform.
I have found this Youtube video and it is sort of doing what I want too, except I need the answer to populate a text box on a userform and be dynamic. This is a link to it Mr Excel & excelisfun Trick 103: Find Missing Numbers In A Series
File Name | File No. | File Type | Event | Ext | RIN | Full Name | Date of Event | Description |
FBi0243.pdf | 0243 | File | Birth | 42568 | Doe, Jane | 01/05/2019 | Birth Transcript | |
PMa0452.jpg | 0452 | Picture | Marriage | jpg | 4857 | Smith, John | 02/03/2018 | Wedding |
PMa0452.jpg | 0452 | Picture | Marriage | jpg | 5638 | Jones, Ann | 02/03/2018 | Wedding |
This is an example of the database. The File No. column is the number I want to generate. The same file name maybe duplicated several times if the file relates to several people eg PMa0452.jpg in table above. But the number should only be used once otherwise. The file number is always 4 digits.
Many Thanks for your help.
Dannielle