Results 1 to 1 of 1

Copy Data into Worksheet

Threaded View

smgregory Copy Data into Worksheet 07-07-2010, 02:56 PM
  1. #1
    Registered User
    Join Date
    07-03-2010
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2003/2007
    Posts
    1

    Copy Data into Worksheet

    Sorry if this has been posted before, but I couldn't find something I could understand. Here is my issue. I have one worksheet, PreSales, with data in it. I filter that data 5 times and paste the results into new worksheets, "temp" "temp1" etc. I then run some formulas in the temp worksheets to determine total number of presales items for each filter and potential dollar amount. I turn off the autofilter in the PreSales sheet so that it displays everything again. I want to then paste the data from temp, temp1, temp2, temp3, temp4 back into the PreSales sheet. HOWEVER, when I try with the following code, I get an error that the copy and paste ranges are different. Can anyone help?
    Thank you in advance!

    Oh, I also want to keep the formatting as well from "temp" back to "PreSales"

    Steve
        Sheets("temp").Select
        Dim Rng As Range
        Set Rng = Selection.SpecialCells(xlCellTypeVisible)
            Rng.Copy
        Sheets("PreSales").Select
        ActiveSheet.Range("A1").End(xlDown).Offset(2, 0).Select
        ActiveSheet.PasteSpecial Paste: xlPasteValues
        Sheets("temp").Select
        ActiveWindow.SelectedSheets.Delete
    Last edited by Leith Ross; 07-07-2010 at 04:44 PM. Reason: Added Code Tags

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