+ Reply to Thread
Results 1 to 9 of 9

Copy/Paste all but formatted total

  1. #1
    Registered User
    Join Date
    09-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    4

    Copy/Paste all but formatted total

    Brand new and just 1.5 cups of coffee into the day. Need help with a macro that looks through a column on one worksheets for values only and copy/pastes those values into another workbook. My issue is that the data changes daily, so the values and row count are different, in addition to the column having a formatted total at the end of the results. I cannot for the life of me figure out how to skip/bypass copying the total (it is a formula cell).

    I was finished with the original macro, just doing the whole column, until I got an updated version that has this total row in it. I'm at the point where I've been staring at it for so long , nothing really makes sense to me, so I need help.

    Thanks in advance.


  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Copy/Paste all but formatted total

    Does this code do the trick?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy/Paste all but formatted total

    I don't think I understand how this works enough to get it into a separate worksheet.

    I need the data from Sheets(1).Select put onto Sheets(2).Select

  4. #4
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Copy/Paste all but formatted total

    When you say Sheets(1).Select or Sheets(2).Select, what precisely are you referring to? Do you mean you want to copy over the selection from one sheet to another? Is it an entire column, or the entire spreadsheet minus the formula cells?

    Is there any chance you could post a sample workbook, as that may help clear things up.

  5. #5
    Registered User
    Join Date
    09-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy/Paste all but formatted total

    Cookie_monster Data.xlsm

    Basically what I'm doing is this:

    Filter #1
    Filtering data for Snuffalufagus and SEAS (G->2)copying
    Copy the results from Column H into a new worksheet (sheets(2)**To be created**) column A

    Filter #2
    Filtering data for CookieMonster and SEAS (G->2)copying
    Copy the results from Column H into a new worksheet (sheets(2)) Column B

    Cell C2 will be the total of Column A
    Cell D2 will be the total of Column B

    I will then make a little table of "easy to read" calculations based on some other stuff which I have the hang of.

  6. #6
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Copy/Paste all but formatted total

    Does this do the trick? I know in your sample you wanted to use CookieMonster as your second filtering critera, but there were no CookieMonsters entered into column B, so I used Telus Communication.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy/Paste all but formatted total

    Got it! Thanks!
    Last edited by hairlesspony; 09-10-2012 at 04:36 PM.

  8. #8
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Copy/Paste all but formatted total

    I may be misunderstanding again. The filter does essentiall reset. Using the example you provided, the first set of filters first filters column B for Snuffualugus, then for Column C SEAS(G-22). It copies the result to column A, which totals 11426. Next, it filters column B for Telus Comm and Column C for SEAS(G-22) and copies the result to column B, totaling 105. Is this incorrect? What should it do?

  9. #9
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Copy/Paste all but formatted total

    Also, hopefully this helps you understand the syntax a bit better. I've sectioned off the code and included comments so it becomes a bit easier to understand. Let me know if this helps

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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