Sum based on multiple conditions in Google Docs

1 Comment

I wanted to compute the SUM of the column based on multiple conditions. I had the data in tabular format like

Rental House 8600
Rental Maid 700
Rental Electricity 600
Grocery Milk 60
General Eating 24
Grocery Snax 22
General Eating 30
Grocery Fruit 52
Grocery Rice150
Grocery Fruit 130
Grocery Snax 60
Grocery Other 20
Grocery Aata 239
Grocery Other  15
Home Accessories 450

FILTER command comes handy in filtering the data on multiple conditions as FILTER(C1:C100, A1:A100=”Grocery”, B1:B100=”Rice”). Wrap this with SUM to get the required result. 

=SUM(FILTER(C1:C100, A1:A100=”Grocery”, B1:B100=”Rice”))

If the FILTER command fails due to not matching of the conditions, the SUM would display “#N/A”. To replace “#N/A” with “0”, I wrapped the FILTER command with ISERROR and my final formula was:

=SUM(ISERROR(FILTER(C1:C100, A1:A100=”Grocery”, B1:B100=”Rice”)))

 

VNC server could not find xauth on solaris

2 Comments

I tried running “vncserver” on Solaris and hit with the error message “vncserver: couldn’t find “Xvnc” on your PATH.”. The problem here is that VNC requires xauth which was not present in the $PATH.  On a quick search I found this blog which solved my issue. The xauth on solaris was available at /usr/X11/bin:/usr/openwin/bin. I changed the $PATH and it worked like a charm 🙂