Home > Blockchain >  How to join data from different sheets using Query in Google Sheets
How to join data from different sheets using Query in Google Sheets

Time:01-02

I am trying to make a simple cash book.

enter image description here

As shown in the picture, from the cash-In and Cash-Out sheets i need to consolidate and display in the monitor sheet according to the selected party.

It should be sorted by date.

sheet link: enter image description here

CodePudding user response:

Try this query-

=QUERY({QUERY('Cash In'!A2:C,"select A, C,0 where B='" & B1 & "'");
QUERY('Cash Out'!A2:C,"select A, 0, C where B='" & B1 & "'")},
"where Col1 is not null order by Col1 label Col1 'Date', Col2 'Cash In', Col3 'Cash Out'")

See sheet harun24hr.

enter image description here

  • Related