Identifying a cell with text using code?
Amazing chart utilities from Jon Peltier
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Identifying a cell with text using code?

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Hi-
    If ActiveCell.Offset(0, .Value = Text Then
    MsgBox "It works"
    End If

    Im trying to see if a cell located 8 cells to the left of a list has any text in it, and if it does to display a msgbox. My code does not work, any ideas??

  2. #2
    MrExcel MVP Barrie Davidson's Avatar
    Join Date
    Feb 2002
    Location
    Winnipeg
    Posts
    2,330
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-25 09:25, Todd_M wrote:
    Hi-
    If ActiveCell.Offset(0, 8).Value = Text Then
    MsgBox "It works"
    End If

    Im trying to see if a cell located 8 cells to the left of a list has any text in it, and if it does to display a msgbox. My code does not work, any ideas??
    Try this:


    If Application.WorksheetFunction.IsText _
    (ActiveCell.Offset(0, 8).Value) = True Then
    MsgBox "It works"
    End If


    Regards,

    _________________

    Barrie Davidson
    My Excel Web Page

    [ This Message was edited by: Barrie Davidson on 2002-03-25 09:45 ]

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Guess what, it works Barrie, thanks!!!

  4. #4
    Board Regular
    Join Date
    Feb 2002
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Barrie- One follow up, Using this idea of a code:


    If Application.WorksheetFunction.IsText _
    (ActiveCell.Offset(0, .Value) = True Then
    TextBox1.Text in Range("an:an")).Delete
    End If

    Im trying to delete a name in row "AN" with the name in textbox1. Inother words when activecell.offset(0, lists a value, then I want the name located in row "AN" (listed in textbox1) to delete!
    Thanks


User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com