+ Reply to Thread
Results 1 to 5 of 5

Pasting values from multiple worksheets into master worksheet

  1. #1
    Registered User
    Join Date
    09-18-2012
    Location
    tx, usa
    MS-Off Ver
    Excel 2010
    Posts
    11

    Pasting values from multiple worksheets into master worksheet

    I am trying to paste values from each worksheet in my workbook into a master worksheet. The problem I'm having is highlighted in yellow below. I cannot seem to change this line to paste values.

    Sub CombineData()
    Dim Sht As Worksheet
    For Each Sht In ActiveWorkbook.Worksheets
    If Sht.Name <> "Master" Then
    Sht.Select
    Range("A:A").Insert
    Range("A2").Formula = "=Mid(Cell(""filename"",B1),Find(""]"",Cell(""filename""))+1,255)"
    Range("A2").Copy
    Range("A2").PasteSpecial Paste:=xlPasteValues
    Range("A2:K2").Copy
    Sheets("Master").Select
    Range("A65536").End(xlUp).Offset(1, 0).Select
    ActiveSheet.Paste
    Sht.Select
    Range("A:A").Delete
    Else
    End If
    Next Sht


    End Sub


    Thanks in advance!

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Pasting values from multiple worksheets into master worksheet

    Try this...

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 05-01-2016 at 10:22 AM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    09-18-2012
    Location
    tx, usa
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Pasting values from multiple worksheets into master worksheet

    AlphaFrog,

    This works great if the data is hard-coded, but it doesn't work if the source worksheets are formulas. I need to paste the values from the source worksheets.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Pasting values from multiple worksheets into master worksheet

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-18-2012
    Location
    tx, usa
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Pasting values from multiple worksheets into master worksheet

    Awesome. Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 03-03-2016, 10:18 AM
  2. Accumulating data from multiple worksheets into a master worksheet
    By niteshmaherchandani in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-04-2013, 06:04 AM
  3. [SOLVED] Subtract multiple quantities sold from multiple worksheets from master inventory worksheet
    By grammydeb52 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-01-2013, 03:01 AM
  4. autofill data to multiple worksheets from master worksheet?
    By chop924 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2013, 02:14 PM
  5. Copy multiple worksheets into a master worksheet
    By shabbir2812 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-10-2013, 01:31 PM
  6. Copying and pasting worksheets into new worksheet as values
    By MikeFranz123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-03-2012, 05:42 AM
  7. COpying & pasting from multiple worksheets to a single worksheet
    By Antho in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2009, 11:48 AM

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