A2H GO
Member
Registered: 14th Sep 04
Location: Stoke
User status: Offline
|
I want to prevent people from putting anything other than H,T, U,O followed by up to 3 numbers into a cell.
Like H7, H77, or H777.
Not 7H, H or H7777.
|
M2RTY
Member
Registered: 25th May 01
User status: Offline
|
Its under the custom format tab, where to tell it its text or currency etc
|
pow
Premium Member
Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
|
Data Validation
|
A2H GO
Member
Registered: 14th Sep 04
Location: Stoke
User status: Offline
|
Yep, think I need soothing along the lines of this:
=AND(ISNUMBER(SEARCH(LEFT(E17,1), "HTUO")), ISNUMBER(MID(E17,2,LEN(E17))+0), LEN(E17<=4))
|
Robbo
Member
Registered: 6th Aug 02
Location: London
User status: Offline
|
quote: Originally posted by pow
Data Validation
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
quote: Originally posted by Robbo
quote: Originally posted by pow
Data Validation
This, although IIRC it still allows you to paste anything to a cell so it isn't full proof.
Edit - VBA would probably be the best solution, could also regex it (plenty of VBA examples on google)
[Edited on 30-10-2011 by Dom]
|