Results 1 to 5 of 5

Compare what cell is stored in a Range variable.

Threaded View

  1. #1
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Compare what cell is stored in a Range variable.

    How would i get something like the following code to work? Right now it returns true no matter what, when this should always be false.

    Sub test()
    Dim tmpbox As Range
    Dim finder As Range
    
    Set tmpbox = Range("a1")
    
    Set finder = Range("a3")
    
    If tmpbox.Offset(1, 0) = finder Then
    MsgBox "True"
    Else
    MsgBox "False"
    End If
    
    End Sub
    Last edited by GaidenFocus; 07-12-2012 at 03:06 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1