+ Reply to Thread
Results 1 to 2 of 2

syntax to search for value on one sheet copied from another sheet

  1. #1
    Registered User
    Join Date
    12-19-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    2

    Question syntax to search for value on one sheet copied from another sheet

    This is for a macro I'm creating. I have everything working except the part that requires the macro to copy a cell from one sheet and then search for the value of that cell on another sheet. The macro starts with the cell I need copied selected.

    The sheet the cell is copied from is called TO DO
    The sheet the cell is searching on is called OVERVIEW

    Selection.Copy
    Sheets("OVERVIEW").Select
    Cells.Find(What:="FEL3-GB", After:=ActiveCell, LookIn:=xlFormulas, _
    LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    MatchCase:=False, SearchFormat:=False).Activate

    The value of the cell in this example is FEL3-GB but I need the macro to search for the value of whatever cell is copied, not just the one that carries the value FEL3-GB.

    Can you help?
    Last edited by imagin; 12-19-2019 at 02:53 PM.

  2. #2
    Registered User
    Join Date
    12-19-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    2

    Re: syntax to search for value on one sheet copied from another sheet

    Maybe it would help if I included more about what I'm trying to do. Here is the full thing I have now, everything is working except the part about finding the cell copied from the original sheet which I have in bold below:


    ActiveCell.Offset(0, -15).Range("A1").Select
    Selection.Copy
    Sheets("OVERVIEW").Select
    Cells.Find(What:="FEL3-GB", After:=ActiveCell, LookIn:=xlFormulas, _
    LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    MatchCase:=False, SearchFormat:=False).Activate
    ActiveCell.Offset(0, 4).Range("Table1[[#Headers],[Region]]").Select
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = Format(Date, "Long Date")
    ActiveCell.Offset(0, 1).Range("Table1[[#Headers],[Region]]").Select
    ActiveCell.FormulaR1C1 = "y"
    ActiveCell.Offset(0, 1).Range("Table1[[#Headers],[Region]]").Select
    Sheets("TO DO").Select
    ActiveCell.Offset(0, 15).Range("A1").Select
    ActiveCell.FormulaR1C1 = "y"
    ActiveCell.Offset(0, 1).Range("A1").Select

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Once a sheet is copied to another blank sheet how to delete a private sub checkbox
    By bdouglas1011 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2019, 03:59 AM
  2. Code to have cells copied from one sheet and pasted under cell in another sheet
    By fruitloop44 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-20-2017, 03:44 PM
  3. Search data copied to sheet
    By Glio in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-29-2016, 12:21 PM
  4. Replies: 0
    Last Post: 05-10-2016, 01:32 PM
  5. Replies: 0
    Last Post: 02-18-2016, 07:26 AM
  6. Replies: 2
    Last Post: 01-01-2015, 09:38 PM
  7. Replies: 3
    Last Post: 11-21-2011, 05:42 AM

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