+ Reply to Thread
Results 1 to 3 of 3

Need Help With Formula/Function

Hybrid View

  1. #1
    Registered User
    Join Date
    02-26-2006
    Posts
    2

    Need Help With Formula/Function

    Looking for a way to search a worksheet for a given value and return the column and row header value(s) for the found cell(s). Any help appreciated!

  2. #2
    R..VENKATARAMAN
    Guest

    Re: Need Help With Formula/Function

    try something like this

    Public Sub test()
    Dim cfind As Range
    Set cfind = Cells.Find(what:="h") 'h is the value you want to find.
    change this
    MsgBox "the coumn header is " & cfind.End(xlUp)
    MsgBox "the row header is " & cfind.End(xlToLeft)


    End Sub

    "scchang" <scchang.23tqpa_1140936602.3981@excelforum-nospam.com> wrote in
    message news:scchang.23tqpa_1140936602.3981@excelforum-nospam.com...
    >
    > Looking for a way to search a worksheet for a given value and return the
    > column and row header value(s) for the found cell(s). Any help
    > appreciated!
    >
    >
    > --
    > scchang
    > ------------------------------------------------------------------------
    > scchang's Profile:
    > http://www.excelforum.com/member.php...o&userid=31937
    > View this thread: http://www.excelforum.com/showthread...hreadid=516615
    >





  3. #3
    Registered User
    Join Date
    02-26-2006
    Posts
    2
    That worked. Thanks.

    To expand, how would I modify this to find all occurrences of "h" and return specific row and column values for each occurence in table form?

    Appreciate your help!

+ 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