+ Reply to Thread
Results 1 to 5 of 5

Macro - copy value only from multiple sheets into one sheet

  1. #1
    Registered User
    Join Date
    02-10-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    3

    Macro - copy value only from multiple sheets into one sheet

    Hello,

    I have been struggling with this Macro for a while and I have tried in every way that's suggested on the web. This Macro works fine to copy data from multiple sheets into one master sheet, but it is also copying the formula. How can I change this Macro so that it is copying and pasting VALUE only?

    Sub Combine()
    Dim J As Integer

    On Error Resume Next

    ' work through sheets
    For J = 4 To Sheets.Count ' from sheet 3 to last sheet
    Sheets(J).Activate ' make the sheet active
    Range("A10").Select
    Selection.CurrentRegion.Select ' select all cells in this sheets

    ' select all lines except title
    Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select

    ' copy cells selected in the new sheet on last line
    Selection.Copy Destination:=Sheets("Combined").Range("A65536").End(xlUp)(2)

    Next
    End Sub
    Please help. I need to resolve this quickly.

    Thanks,

    Yang
    Last edited by yangfang; 02-11-2010 at 05:11 PM. Reason: solved

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro - copy value only from multiple sheets into one sheet

    Welcome to the forum. Be sure to read through the Forum Rules so you can use and follow them effectively. For instance, you'll need to edit that post above and put code tags around that code you used. (Like I did below...)

    Please Login or Register  to view this content.
    Easy and quick solution is ready, I'll post it after you fix your post above.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    02-10-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Macro - copy value only from multiple sheets into one sheet

    Thanks! I have updated it.

    Really appreciate in advance for your help.
    Last edited by yangfang; 02-11-2010 at 05:57 AM. Reason: reply

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro - copy value only from multiple sheets into one sheet

    Try this:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-10-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Macro - copy value only from multiple sheets into one sheet



    You are great! This has solved my issue. I will close my case.

    Thanks so much!
    YF


+ 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