LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Comparison operator

Hi...

My code is:

If Cells(rw, colno).Value = "US" Or _
Cells(rw, colno).Value = "AI" Then
With Cells(rw, colno)

If UserForm1.ch_sensrtype_d.Value = False Then
.Value = UserForm1.sensrtype.Value
Else
.Value = sensrtype_d
End If
ENd IF

In the line
Cells(rw, colno).Value = "AI", I am comapring cell value with "AI".
However, here I want to search if any part of the cell contains "AI". Measn,
if my cell has value "AIT", then also this statement should become true.

I tried writing "*" & "AI" & "*" but it doesnt work. How can I do this?

Regards,

Pawan
 
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
Text "comparison" operator for "contains" used in an "IF" Function Pawaso Excel Worksheet Functions 4 April 4th 23 11:35 AM
Comparison Operator "" NOT "=" monir Excel Discussion (Misc queries) 4 October 22nd 07 02:42 AM
Complex comparison of Columns of Data: Extracting unique records after comparison on 4 levels ap Excel Programming 2 January 23rd 07 10:12 AM
Adding a comparison Operator button on a toolbar Teacher in Need Excel Discussion (Misc queries) 1 October 4th 06 01:08 AM
"IN" comparison operator Jared Excel Programming 1 January 24th 05 04:29 PM


All times are GMT +1. The time now is 02:59 PM.

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"