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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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