Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Apr 2001
    Location
    Arriving Somewhere but not Here
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts

    find text in a single row (XL2000 sr1)

    I want to be able to:

    lookup("M", in a small range that is only one row high, return the contents of the cell to the left)

    I've found <post#=244408>post 244408</post#> but as yet not had any luck getting those ideas to work for me.

    stuck

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: find text in a single row (XL2000 sr1)

    Something like this?

    <pre>=INDEX($A$1:$H$1,MATCH("M",$A$1:$H$1,0)-1)</pre>


    Steve

  3. #3
    Lounger
    Join Date
    Feb 2003
    Location
    Renfrewshire, Scotland
    Posts
    35
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: find text in a single row (XL2000 sr1)

    With Worksheets("Feb04").Range("B:B")
    Set n = .Find("M", LookAt:=xlWhole, LookIn:=xlValues) ' do you need to look at whole or part???
    If Not n Is Nothing Then ' Found it!!!
    ExistingM = True
    firstaddress = n.Address
    InfoYouWant = Worksheets("Feb04").Range(n.Address).Offset(0, -1).Value
    End With
    use your own variables and something like this should work.
    A findnext should repeat for other cells - I've seen this code before in the help files - can't remember where, but something similar is used to find and delete duplicate rows.

    DougieW

  4. #4
    5 Star Lounger
    Join Date
    Apr 2001
    Location
    Arriving Somewhere but not Here
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: find text in a single row (XL2000 sr1)

    On a simple test sheet here at home, something [i]exactly[i] like that.

    Why couldn't I get there at work even with your star post in front of me? Don't answer that. One day I'll realise it's better to use the final hour before I go home doing stuff well inside my experience because my brain has already left!

    Thanks,

    stuck

Posting Permissions

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