0

There is a lot of tutorials that show how to merge multiple sheets, so basically there is 2 formulas:

={FILTER({sheet#1-range},LEN({sheet#1-range-first-column})>0);
FILTER({sheet#2-range},LEN({sheet#2-range-first-column})>0);...}

or

=QUERY({{sheet#1-range};{sheet#2-range};...,"Select * where Col1 is not null")

Both producing a result sheet but it is not possible to indicate the data provided by a specific sheet. What I want is the result sheet to contain a field that have a name of the source sheet for each row.

Is it possible to achieve by modifying any of the formulas?

enter image description here

1 Answer 1

1

Try something like:

=QUERY(
        {{sheet#1-range,index(substitute(sheet#1-range,sheet#1-range,"sheet1"))};
         {sheet#2-range,index(substitute(sheet#2-range,sheet#2-range,"sheet2"))};
         ...,
    "Select * where Col1 is not null")
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.