![]() |
If Cell.Value Like "Hand*" And Cell.Value < "Hand*lch*" Then???
I'm sure this is very simple? However, I'm very keen but, clearly, still
learning! What is wrong with this statement? Actually, I'll qualify that because I know what's wrong with it; it doesn't work! Any ideas why? I know it's got something to do with my using the wild character * which negates the second expression but don't know how else to achieve this? If Cell.Value Like "Hand*" And Cell.Value < "Hand*lch*" Then Basically, I have this statement in a For... statement checking all the cells in a range. However, I want all cells that begin with "Hand" to be selected APART from those that begin with "Hand" but also have "lch" afterwards, such as "Hand LCH". Any ideas? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
If Cell.Value Like "Hand*" And Cell.Value < "Hand*lch*" Then???
ActiveCell.Value Like "Hand*" And Not ActiveCell.Value Like "Hand*lch*"
-- John Green - Excel MVP Sydney Australia "Kobayashi" wrote in message ... I'm sure this is very simple? However, I'm very keen but, clearly, still learning! What is wrong with this statement? Actually, I'll qualify that because I know what's wrong with it; it doesn't work! Any ideas why? I know it's got something to do with my using the wild character * which negates the second expression but don't know how else to achieve this? If Cell.Value Like "Hand*" And Cell.Value < "Hand*lch*" Then Basically, I have this statement in a For... statement checking all the cells in a range. However, I want all cells that begin with "Hand" to be selected APART from those that begin with "Hand" but also have "lch" afterwards, such as "Hand LCH". Any ideas? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 11:54 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com