+ Reply to Thread
Results 1 to 3 of 3

Copy and PasteSpecial Values after Find and Offset

  1. #1
    Registered User
    Join Date
    06-01-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Copy and PasteSpecial Values after Find and Offset

    Hi Guys,

    I created a new Macro which was working brilliantly until I tried to:

    Copy Sheets("Sheet8").Range("L24") and pastespecial into ActiveCell (immediately following the Offset).

    Any suggestions would be greatly appreciated? Here's the sample code:

    Please Login or Register  to view this content.
    NB: This question also appears in: http://www.ozgrid.com/forum/showthread.php?t=179331

  2. #2
    Registered User
    Join Date
    11-27-2012
    Location
    Alabama
    MS-Off Ver
    Excel 2003
    Posts
    53

    Re: Copy and PasteSpecial Values after Find and Offset

    This might get you going back in the right direction. I commented out a piece of your code that was not complete. It looks like you started an if statement but didnt finish.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-01-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Copy and PasteSpecial Values after Find and Offset

    Quote Originally Posted by billstpierre79 View Post
    This might get you going back in the right direction. I commented out a piece of your code that was not complete. It looks like you started an if statement but didnt finish.

    Please Login or Register  to view this content.
    Hi Bill,

    Thanks for having a look. For some reason, when you enter the date into the Find Message Box and click Enter, it no longer goes to the correct date and offsets to one column. IE: Sheets("Sheet11").Range("B:B"), offsets to Column C. Instead, it now says: "Not Found"

    Please Login or Register  to view this content.
    In regard to the code above, I'm giving the user the opportunity to copy the value from Sheets("Sheet8").Range("L24") and paste into the selected offset cell in Sheets("Sheet11"), column C, but in doing so, if the date in the found Sheets("Sheet11").Range("B:B") doesn't equal the date in Sheets("Sheet8").Range("F1"), I'm asking them are you sure you really want to copy this value across?

    Thanks and looking forward to thoughts and comments?

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy and PasteSpecial Values after Find and Offset

    One of these codes will compare the values found in column B, but offset(-1) which is column A=Sheets("Sheet8").Range("F1")

    Please Login or Register  to view this content.
    If you want to compare to column B, remove the offset, or change the -1 in to 0

+ 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