+ Reply to Thread
Results 1 to 3 of 3

Find

  1. #1
    Registered User
    Join Date
    12-12-2005
    Posts
    2

    Find

    I can't seem to get my code to work. All i need to do is determine if a cell has a Name in it or if it is blank. Could i get some help please.

    Thanks

  2. #2
    Norman Jones
    Guest

    Re: Find

    Hi T,

    Perhaps this will help:

    '=============>>
    Public Sub Tester()
    Const sAdd As String = "A1" '<<==== CHANGE
    Const sName As String = "Test" '<<==== CHANGE

    If IsEmpty(Range(sAdd)) Then
    MsgBox "The cell " & sAdd & " is blank"
    ElseIf Range(sAdd) = sName Then
    MsgBox "The cell " & sAdd & "text = " & sName
    ElseIf InStr(1, Range(sAdd), sName, vbTextCompare) Then
    MsgBox "The cells " & sAdd _
    & " text includes " & sName
    Else
    MsgBox "The contents " & sAdd & " = " _
    & Range(sAdd).Value
    End If
    End Sub
    '<<=============

    --
    ---
    Regards,
    Norman



    "tkemo569" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I can't seem to get my code to work. All i need to do is determine if a
    > cell has a Name in it or if it is blank. Could i get some help please.
    >
    > Thanks
    >
    >
    > --
    > tkemo569
    > ------------------------------------------------------------------------
    > tkemo569's Profile:
    > http://www.excelforum.com/member.php...o&userid=29573
    > View this thread: http://www.excelforum.com/showthread...hreadid=493150
    >




  3. #3
    Niek Otten
    Guest

    Re: Find

    <my code >

    What code?

    --
    Kind regards,

    Niek Otten

    "tkemo569" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I can't seem to get my code to work. All i need to do is determine if a
    > cell has a Name in it or if it is blank. Could i get some help please.
    >
    > Thanks
    >
    >
    > --
    > tkemo569
    > ------------------------------------------------------------------------
    > tkemo569's Profile:
    > http://www.excelforum.com/member.php...o&userid=29573
    > View this thread: http://www.excelforum.com/showthread...hreadid=493150
    >




+ Reply to Thread

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