+ Reply to Thread
Results 1 to 4 of 4

VBA to copy data from an Excel worksheetA to worksheetB with data based on a cell value

  1. #1
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    VBA to copy data from an Excel worksheetA to worksheetB with data based on a cell value

    Sorry folks, but I was having a hard time describing what I want in the title. In the attached example, I want to replace the date in sheet1.Range("D2:D4") based upon the serial number in sheet 2 and replace the date on sheet1 with the date on sheet 2 that corresponds to the right row. Thanks!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-28-2018
    Location
    Houston, TX
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    127

    Re: VBA to copy data from an Excel worksheetA to worksheetB with data based on a cell val

    This simple code should accomplish your task.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: VBA to copy data from an Excel worksheetA to worksheetB with data based on a cell val

    Thanks brant! I provided a very simple example of what I need to do, but usually once I can get a start from wise people like you I am able to figure the rest out.

  4. #4
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: VBA to copy data from an Excel worksheetA to worksheetB with data based on a cell val

    Something I forgot to do was also add a column to the right of the search column(E), but I was able to figure that out just by adding another line, Sheet1.Range("F" & UpdateRow).Value2 = hdate which does the trick. This should work fine for what I need to do. Thanks.

+ 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. Excel VBA - Copy Data based on a cell value and filter to new sheet
    By scruz9 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-18-2016, 08:06 AM
  2. [SOLVED] VBA: Need to copy data in one cell on one worksheet to another based on data
    By Deanne in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-03-2014, 07:45 PM
  3. [SOLVED] Formula Needed to copy data from a cell based on data entered into another cell
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-10-2013, 03:16 AM
  4. Copy row of data to another sheet based on cell data
    By david028 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-29-2013, 09:38 AM
  5. Replies: 2
    Last Post: 05-17-2013, 01:58 AM
  6. Replies: 0
    Last Post: 12-10-2012, 01:02 PM

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