2
=arrayformula(if(LEN(A:A),if(ROW(A:A)=1,"Outstanding amount Payment",
 sum(QUERY(daily_fee_collection!A:D,"select D where B="&A:A&"",-1)))))

I am trying to cross-check for payments made in the sheet containing transaction records with the sheet containing the voucher no. against which the purchase was made.

The formula only works if I change A:A in the query string

"select D where B="&A:A&"

to

A2:D
0

=IFERROR(ARRAYFORMULA(VLOOKUP(A2:A, QUERY('daily cash'!A2:D, 
 "select A,C, sum(D) group by A,C label sum(D)''"), 3, 0)), )

9

  • I have already tried this. It picks only the data of cell A1 and that same A1 cell data I used throughout the columns – tinker shukla Jan 5 at 9:26
  • please have a look on this sample sheet. docs.google.com/spreadsheets/d/… – tinker shukla Jan 7 at 6:50
  • @tinkershukla answer updated - problem solved – user0 Jan 7 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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