Results 1 to 7 of 7

Retrieve Data Using Find Function And Selecting Nearby Cells

Threaded View

  1. #1
    Registered User
    Join Date
    08-02-2011
    Location
    Miami
    MS-Off Ver
    Excel 2007
    Posts
    4

    Question Retrieve Data Using Find Function And Selecting Nearby Cells

    Hi,

    I'm trying to retrieve data from worksheets in reports in excel which I will have to do from time to time. The best way I can think to do this is using control + find functions to find the specific data element I am looking for and then to select a nearby cell based on this cell. I am thinking - if my find search takes me to cell A21, then I want to select cell C21. I can't figure out how to do this though. My VBA code looks like below:

    Sub
    ActiveSheet.Next.Select
    Cells.Find(What:="name and address", After:=ActiveCell, LookIn:= _
    xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
    xlNext, MatchCase:=False, SearchFormat:=False).Activate
    Range("B14").Select
    Selection.Copy
    ActiveSheet.Previous.Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Range("B1").Select
    End Sub

    I know I need to do something with the 'Range("B14").Select' line but don't know what. I've tried 'ActiveCell.Offset(0, 1).Select' but can't get this to work. Any help/advice would be greatly appreciated...

    Thanks!!!
    Last edited by csukenik; 08-10-2011 at 05:13 PM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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