+ Reply to Thread
Results 1 to 5 of 5

Search for cell equal to cell in another worksheet

Hybrid View

  1. #1
    Registered User
    Join Date
    04-30-2008
    Posts
    9

    Thanks!

    Thanks Rylo. I think I can make that work. My challenge for this VBA noobie is to reformat/clear out the 'Print 6Day' cells in case I run the macro multiple times. I get a runtime error every time there's already a cardio workout copied into Print 6Day. A copy and paste of blank cells isn't working.

    Any suggestions?

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    as you are taking your formats from the copied data, try

    Sub aaa()
      Sheets("Print 6Day").Range("A4:H21").Clear
      Set findit = Sheets("Cardio Database").Cells.Find(what:=Range("B3").Value)
      findit.Offset(1, 0).Resize(18, 8).Copy
      With Sheets("Print 6Day")
        .Range("A4").PasteSpecial (xlPasteValues)
        .Range("A4").PasteSpecial (xlPasteFormats)
      End With
      
    End Sub
    rylo

  3. #3
    Registered User
    Join Date
    04-30-2008
    Posts
    9

    Thanks again

    works great. this small macro is gonna help me out tremendously. A few more additions, and it'll be all set up.

+ 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