0

i want validate my cell on basis in below values

For ex :

  1. 12345678 Test Test Tets so beginning of cell always with 8 numeric digits

  2. Test Test Tets (12345678) end of cell always with 8 numeric digits inside brackets

Trying below but it only give the first character numeric or not

=IF(ISERR(LEFT(A2,1)*1),"letter","number")

enter image description here

2
  • ISNUMBER(LEFT(A2,8)) will return True if and only if the left hand 8 digits of A2 is a valid number. If there are only two possible cases, this is all you need - all others must be "not number". If you need to explicitly test for 8 digits in brackets as well, because there is a third group of cases which could be neither, you might need to edit your post to make it a bit clearer. – AdamV May 6 at 10:48
  • added image of required output hope it helps – kumar May 6 at 10:57
1

Try:

=IF(ISNUMBER(LEFT(A2,8)),"Number",IF(ISNUMBER(MID(A2,LEN(A2)-9,8)),"Letter","Neither"))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.