+ Reply to Thread
Results 1 to 3 of 3

Getting data from multiple sheets

Hybrid View

  1. #1
    Registered User
    Join Date
    03-02-2011
    Location
    florida
    MS-Off Ver
    Excel 2007
    Posts
    2

    Getting data from multiple sheets

    I have a workbook created to keep track of financial information sorted monthly on separate sheets with a totals page. All the pages are set up the same as far as cell locations, on my totals page they are broke into the different categories and I am pulling info for each month to my totals page. I have set up the first month and wanted to know if there was a way to set up the others without typing each cell individually? I have attached the file to show what I am doing. Thanks in advance for any help
    Attached Files Attached Files
    Last edited by metalman32060; 03-02-2011 at 07:15 PM. Reason: title change

  2. #2
    Registered User
    Join Date
    02-10-2011
    Location
    Denmark
    MS-Off Ver
    Excel 2010 & Windows 7
    Posts
    23

    Re: Getting data from multiple sheets

    This VBA should do it

    Sub Copy_right()
        Dim R_text As String
        Dim W_text As String
        For i = 1 To 11
            Range("A3").Select
            Do While ActiveCell.Offset(0, 1).Value <> ""
                ActiveCell.Offset(0, 1).Activate
            Loop
            Range(ActiveCell, ActiveCell.Offset(22, 0)).Select
            If i = 1 Then
                R_text = ActiveCell.Offset(-1, 0).Value & "!$"
                W_text = ActiveCell.Offset(-1, 0).Value & "!"
                Selection.Replace What:=W_text, Replacement:=R_text, LookAt:=xlPart, _
                    SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
                    ReplaceFormat:=False
            End If
            Selection.Copy
            ActiveCell.Offset(0, 1).Activate
            ActiveSheet.Paste
            Application.CutCopyMode = False
            R_text = ActiveCell.Offset(-1, 0).Value
            W_text = ActiveCell.Offset(-1, -1).Value
            Selection.Replace What:=W_text, Replacement:=R_text, LookAt:=xlPart, _
                SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
                ReplaceFormat:=False
        Next i
        Range("A1").Select
    End Sub

  3. #3
    Registered User
    Join Date
    03-02-2011
    Location
    florida
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Getting data from multiple sheets

    Wow,
    Thanks you so much, had to google how to use a macro properly =) but worked perfectly

+ 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