Hi
Please could someone help with the following
I need to validate what is being inputted into a cell, via a Input Box
If the input is 2 letters followed by 7 number then it is ok, otherwise they need to enter it again
AB1234567 - OK
anything esle - Not OK
thanks
roast
If you are entering directly into a cell, then you can use Data|Validation..
choose Custom and enter formula:
=AND(LEN(G7)=9,NOT(ISNUMBER(LEFT(G7,2)+0)),ISNUMBER(RIGHT(G7,7)+0))
Where G7 is the cell to validate.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
You will need more code, but I am not a VBA guy...sorry.
Someone else can help..
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks