+ Reply to Thread
Results 1 to 2 of 2

paste by date

  1. #1
    Btobin0
    Guest

    paste by date

    I have a macro below where the search takes the information from Cell A1 adds
    it to a hyperlink, copies information and pastes it back into excel.
    Currently I have the range set to Z3 and Z15 where it pastes. My question is
    if the Cell is A1 and has a date in it, how can I have it find another cell
    with the same information and paste underneath it?

    If cells go like:
    5/25, 5/26, 5/27

    How can I paste if the search was for the 26th without specifying directly?


    Range("A2").Select
    Selection.Copy
    Application.CutCopyMode = False
    Application.DisplayAlerts = False
    Workbooks.Open Filename:= _
    "/total." & Sheet1.Range("a1") & "." & Sheet1.Range("A1") & ".htm"
    Range("B6").Select
    Selection.UnMerge
    Range("B6:B16").Select
    Selection.Copy
    ActiveWorkbook.Close
    Application.DisplayAlerts = False
    Sheets("Sheet1").Select
    Range("z3").Select
    ActiveSheet.Paste
    Workbooks.Open Filename:= _
    "/total." & Sheet1.Range("a1") & "." & Sheet1.Range("A1") & ".htm"
    Range("B18").Select
    Selection.UnMerge
    Range("B18:B28").Select
    Selection.Copy
    ActiveWorkbook.Close
    Sheets("sheet1").Select
    Range("z15").Select
    ActiveSheet.Paste


  2. #2
    Registered User
    Join Date
    05-10-2006
    Posts
    53
    Try using the Find method in VBA, where you can take in a specific information to search for, where you can reference that from your search range. Use the VBA Help to see how it works.

+ 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