I am writing code to control the input of names by the user to ensure that the names are entered in the correct format so that I can search for names elsewhere in the workbook using the VLOOKUP function.
The way I have set about this is as follows:
1. Set up a form to capture the Forename and Surname
2. Ensure that the form has been completed fully
3. Select the first cell in the first row below the headings
4. Insert a blank row below the first row of data
5. Copy the cells formulae (NOT the name cell) down from the top row to the next row. The row will not be a fixed number of columns. THIS IS THE AREA WHERE I NEED HELP
6. Insert the name in the blank name cell
7. Sort the table alphabetically
This is what I have managed to do so far (below). I have indicated in the code where I think the code should go but I am happy to accept any alternative ideas and code.
One further development of the code that I am considering is to use reference names for Range variables instead of actual cell addresses (e.g. Range ("B2") becomes Range ("NamedCell") in case the user of the form adds rows about the table.
Any advice would be much appreciated.
Bookmarks