Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Like or Equal

Take a look at what Like does in VBA's help:

then try this:

Option Explicit

Sub testme01()
Dim cellA As Range
Dim cellB As Range

With Worksheets("sheet1")
Set cellA = .Range("a1")
Set cellB = .Range("b1")

cellA.Value = "*hi*"
cellB.Value = "hi"

MsgBox (cellB.Value = cellA.Value) & vbLf & _
(cellB.Value Like cellA.Value)

End With
End Sub



"H. Zhu" wrote:

What difference do the following two statements make

if cellA like cellB then

if cellA = cellB then

Thanks in advance


--

Dave Peterson

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
can I make cell "yes" equal 1, "no" equal 0 can I make cell yes equal 1, no equa Excel Discussion (Misc queries) 4 April 22nd 23 06:09 AM
Using = (equal) Jimmer Excel Discussion (Misc queries) 2 June 27th 09 03:17 AM
CountIF(A9:A20, B9 not equal B10, B10 not equal B11, etc.) Red Herald Excel Worksheet Functions 2 November 13th 08 12:11 AM
Value of Less Than Zero to Equal Zero thomasstyron Excel Discussion (Misc queries) 6 July 31st 05 02:42 AM
Getting 0 to equal 1 soxn4n04 Excel Worksheet Functions 9 November 30th 04 04:15 PM


All times are GMT +1. The time now is 09:28 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"