I have 4 identical google sheets that get continuously filled with data from 4 different google forms. I want to merge the 4 resulting sheets into one Final Sheet. Moreover I want to be able to distinguish the data in the final sheet by which form (and thus sheet) it comes from for chart purposes, adding this to the next column. How can i manage it using IMPORTRANGE?
I've tried with the formula:
=ARRAYFORMULA(
QUERY(
{IMPORTRANGE("sheetkey","worksheetA!A2:D"),
IF(ISBLANK(IFERROR(IMPORTRANGE("sheetkey","worksheetA!A2:A"))),,"data01");
IMPORTRANGE("sheetkey","worksheetB!A2:D"),
IF(ISBLANK(IFERROR(IMPORTRANGE("sheetkey","worksheetB!A2:A"))),,"data02")},
"select * where Col1 is not null"))
but it doesn't seem to work with dynamic data. Any suggestions?