Hi @mnathans ,
I’m glad to hear the sheet is very useful for you.
Here’s how you can add an Account column in the Bill History Query.
-
In the hidden part of the sheet, add the word “Account” to U9. This will locate your Account column in the Transactions sheet.
-
Fill down V8 and W8 to V9 and W9 so the Column and Range for the Account column will be listed.
-
Adjust the formula in F6 to include the new Account column, which will be referenced as INDIRECT(W9). You will also need to adjust the LABEL by creating 3 space and 4 space empty labels, since the Amount field covers 3 columns and you want the Account column after that. This is just a weird Google Sheets hack. Here’s the new formula:
=IF(I4="",IFERROR(1/0),iferror(IFNA(QUERY({INDIRECT(W6),INDIRECT(W7),INDIRECT(W8),INDIRECT(W9)},"SELECT Col1,Col2,' ',' ',-1*Col3,' ',' ',Col4 WHERE Col2 CONTAINS '"&I4&"' ORDER BY Col1 DESC LIMIT 15 LABEL ' ' '',' ' '',-1*Col3 '',' ' '', ' ' '' "),"None")))
I don’t think the number of spaces are showing correctly in the formula above when it is copied and pasted. And the number of spaces matters.
Here’s the formula with S’s for each space, just as a example. This won’t work with the S’s in place.
=IF(I4="",IFERROR(1/0),iferror(IFNA(QUERY({INDIRECT(W6),INDIRECT(W7),INDIRECT(W8),INDIRECT(W9)},"SELECT Col1,Col2,'S','SS',-1*Col3,'SSS','SSSS',Col4 WHERE Col2 CONTAINS '"&I4&"' ORDER BY Col1 DESC LIMIT 15 LABEL 'S' '','SS' '',-1*Col3 '','SSS' '', 'SSSS' '' "),"None")))
- Then add an Accounts label to M5.
This worked for me. Let me know if it works for you.
I’m not clear on the case-sensitive issue you mentioned. Could you provide a bit more detail. It seems case-sensitive matching will prevent unwanted ALL CAPS matching.
Jon