#### Peter_SSs

##### MrExcel MVP, Moderator

- Joined
- May 28, 2005

- Messages
- 43,641

- Office Version
- 365

- Platform
- Windows

I agree.@Phouc,

These are both excellent and elegant solutions to the OP's first two questions! Great <del>incite</del> insight into the underlying mathematical structure of the problem!

.. or using Phuoc's ideas and your notation... you can use this somewhat compact code line to do your latest check...

MsgBox [AND(LEFT(A1)=MID(A1,2,1),MID(A1,3,1)=RIGHT(A1),LEFT(A1)<>RIGHT(A1))]

Code:

`MsgBox [AND(MOD(LEFT(A1,2),11)=0,MOD(RIGHT(A1,2),11)=0,MOD(A1,1111)>0)]`