![]() |
text or numeral
I am a newbie in excel VBA.
I attempt to set a condition to test cells property. 1. The cell have 5 characters 2. The first 2 characters are letters 3. The last 3 characters are numeral |
text or numeral
I am a newbie in excel VBA.
I attempt to set a condition to test cells property. 1. The cell have 5 characters 2. The first 2 characters are letters 3. The last 3 characters are numeral Test the contents of your Cell like this... If ContentsOfCell Like "[a-zA-Z][a-zA-Z]###" Then ' cell contents are 2 letters followed by 3 numbers End If Rick |
text or numeral
Thanks
"Rick Rothstein (MVP - VB)" wrote in message ... I am a newbie in excel VBA. I attempt to set a condition to test cells property. 1. The cell have 5 characters 2. The first 2 characters are letters 3. The last 3 characters are numeral Test the contents of your Cell like this... If ContentsOfCell Like "[a-zA-Z][a-zA-Z]###" Then ' cell contents are 2 letters followed by 3 numbers End If Rick |
All times are GMT +1. The time now is 08:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com