Google sheets date formula and conditional addition for baby feeding

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Google sheets date formula and conditional addition for baby feeding



I'm looking for an easy way to account my son's food intake. The trouble is, all of the forms we've used to date are arduous when trying to collect data straight into spreadsheets. So I thought we could use an IFTT/Do button.



A couple problems I need help with:


DATE



Here's a link to a sample spreadsheet so far. https://docs.google.com/spreadsheets/d/1ds_IvgS5JWuFmsEipk-wUcsfGQVSVD1tXPydDCoT7Xo/edit?usp=sharing





You should provide the required information in the question, not solely in links (e.g. an example input from IFTTT). Tried anything? Seems you want to "sum if"...
– tehhowch
Aug 13 at 1:02




1 Answer
1



I hope you enjoy this special time.
I would leave column A alone, probably you get no control on that.
But for column B, if you get to, I follow your lead on the condition, but I would want numbers for the results so I can do math on them, so =ARRAYFORMULA(if(A2:A>"0",30,0))


=ARRAYFORMULA(if(A2:A>"0",30,0))



I introduced a column C for Dates and a Column D for times and did the following in C2 to get them:


=arrayformula(if(isblank(A2:A),"",SPLIT(A2:A," at ",false))).



To make these look nice, I formatted the respective columns as dates and times.



In column E I wanted the various dates, so I wrote in E2,


=unique(C2:C)



Then to get the sums per date I had had a really gross QUERY for SUM(B) where C = Date..., and then I saw the comment with the sumif idea. So in F2 you can put the following and drag down as needed:


=sumif(C2:C,E2,B2:B)



and you have your totals by day.





Thank you so much, your advice is really helpful and gives me a good starting point for a lot more learning. So I've implemented your formulas across the table and it seems to be working really well except for one error (I've highlighted it in the spreadsheet too). It seems that the "sum if" formula produces correct results except for the Aug 12 date. I'm not sure why that might be the case. Secondly, is it possible to turn that "sumif" formula in to an array - I suspect I'm going to quickly run out of rows weekly given the 30ml increments.
– SheetsNoob
Aug 16 at 16:48






You have entries for August 12th hiding on line 1006-1009
– Jeremy Kahan
Aug 16 at 20:00





I do not have time to think hard about it now, but see stackoverflow.com/questions/30081491/… for an example of doing arrayformula on sumif. In this case my naive, untested belief is =arrayformula(sumif(C2:C,E2,B2:B)) should work.
– Jeremy Kahan
Aug 16 at 20:05






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.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard