Importing Multiple Sheets into One Master Sheet GoogleSheets

mgoldie1

New Member
Joined
Apr 18, 2017
Messages
12
II am trying to extract all data that has dates in Col 1 from multiple sheets to one master. I would also like to make that master sheet in date order and have it auto sync whenever I add anything to any of the sheets. I tried to follow a video, but it didn't work. Here's the formula I was using::

=QUERY({PlayMGM!A5:K;SugarHouseNJ!A5:K;'Bet365'!A5:K;SugarHousePA!A5:K;FanDuel!A5:K;Caesars!A5:K;'888'!A5:K;PointsBet!A5:K;'Hard Rock'!A5:K;'Rivers Casino'!A5:K;'Bet America'!A5:K;'Borgata Sports'!A5:K;'William Hill'!A5:K},"select * where Col1 is not null*,0).

Unfortunately, I got an error and can't figure out how to fix it (Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " "*" "* "" at line 1, column 32. Was expecting one of: <EOF> "group" ... "pivot" ... "order" ... "skipping" ... "limit" ... "offset" ... "label" ... "format" ... "options" ... "and" ... "or" ...)

Any suggestions?
 

Some videos you may like

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Logit

Well-known Member
Joined
Aug 31, 2016
Messages
3,500
Re: Importing Multiple Sheets into One Master Sheet

.
Your request begins with searching for DATES in Col A. Then you begin describing TEXT in Col A. ???

The following macro (presuming you can utilize a macro in your project vs a formula) will search each sheet in the workbook / Col A for
DATES. If a DATE is found in any cell in Col A, it will copy the entire row and paste it in Sheet 1 to the next empty row.

Keep in mind, if any cells in the various sheets (in Col A) have only a number - even if it isn't a DATE - this macro will copy those rows also.
So this macro is also presuming non of the Col A cells in all the sheets will contain a number only.

Code:
Option Explicit


Sub test()
    
Dim Rws As Long, Rng As Range, ws As Worksheet, sh As Worksheet, c As Range, x As Integer
    Set ws = Worksheets("Sheet1")  'specify sheet name here to paste to
    Set sh = ActiveSheet
    x = 2   'begins pasting in Sheet1 on row 2
    Application.ScreenUpdating = 0
    For Each sh In Sheets
        If sh.Name <> ws.Name Then
            With sh
                Rws = .Cells(Rows.Count, "A").End(xlUp).Row 'searches Col A all sheets
                Set Rng = .Range(.Cells(2, "A"), .Cells(Rws, "A"))
                For Each c In Rng.Cells
                    If IsDate(c.Value) Then    'searches for DATE values
                        c.EntireRow.Copy
                        ws.Range("A" & x).PasteSpecial Paste:=xlValues
                        x = x + 1
                    End If
                Next c
            End With
        End If
    Next sh
ws.Range("A1").Select
    
End Sub
 

mgoldie1

New Member
Joined
Apr 18, 2017
Messages
12
Re: Importing Multiple Sheets into One Master Sheet

Thanks for the reply. I'm not too knowledgeable with macros. And, I'm trying to run this in google sheets (I was hoping that excel and google were similar enough).

Also, Col 1 is either is blank or has dates. The rows that have dates are the ones I want transferred over. Blank cells in Col 1 should be ignored, along with their corresponding rows.

Any other suggestions? Thanks.
 

Logit

Well-known Member
Joined
Aug 31, 2016
Messages
3,500
Re: Importing Multiple Sheets into One Master Sheet

.
Sorry .. I am not familiar with Google Sheets. There are some differences. Hopefully another volunteer can assist.
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,544
Messages
5,511,949
Members
408,870
Latest member
SBrowning

This Week's Hot Topics

  • Turn fraction around
    Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
  • TIme Clock record reformatting to ???
    Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
  • TextBox Match
    hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
  • Using Large function based on Multiple Criteria
    Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
  • Can you check my code please
    Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
  • Combining 2 pivot tables into 1 chart
    Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...
Top