Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default 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/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
"CELL("FILENAME") NOT UPDATE AFTER "SAVE AS" ACTION yossie6 Excel Discussion (Misc queries) 1 June 16th 08 12:16 PM
Help!!! Enter "7" in a cell and Excel changes the "7" to "11" immediately!!! [email protected] Excel Discussion (Misc queries) 3 January 5th 07 02:18 PM
how do I "freeze" the left hand title column DDAANN Setting up and Configuration of Excel 4 February 26th 06 12:21 PM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM


All times are GMT +1. The time now is 07:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"