Sumifs with Dates in plain text not working - google-sheets

I am trying to sum revenue for november. Dates of transactions are stored in plain text like this '10-11-2022'.
Date
Revenue
10-11-2022
$10
11-11-2022
$11
I am using this formula: sumif(A:A,"*-11-2022",B:B)
It is returning 0
I know there are problems around dates, but this exact approach is working in a different google sheets file, just not the one I'm working on. Please help me figure out why.
I've also tried manually entering the word 'Nov' in a separate column that is also plain text and using that in the formula, and that also doesn't work.

assuming amounts are also in plain text:
=SUM(FILTER(SUBSTITUTE(B2:B; "$"; )*1; MONTH(A2:A*1)=11))

Related

Calculating average for more than one month of data

I am writing some formulas that will make up a dashboard that allows for a dynamic look-up of change in waiting times for admission into a hospital. In this case, what I want to do is create a lookback period of 1 month, 3 months, 6 months, and 1 year to see how waiting times have changed during this time at a few locations. It's a bit of a complex issue, but the stripped down data and my example code can be found here (fully shared for editing).
I have successfully gotten the correct formulas for finding 1 month worth of change, but how to apprroach more than 1 month's worth of data eludes me and this is especially problamatic because the date formatting is not standard excel/google sheets data format. As this data will be continously fed into the spreadsheet, I don't think I have the option to modify it either so I think the only option is to come up with some pretty funky formulas that treat months as text. Alternatively, I guess I can also try to make a formula that reformats the text into valid google sheets dates and then use that to make calculations but then while I could probably write that formula, I'd still not know how to get multiple months worth of data processed. Can anyone help take a look at the sheet? (feel free to copy/edit the file if necessary).
try like this:
=QUERY({INDEX(SPLIT(Data!A3:A, "T"),,1), Data!B3:C},
"select avg(Col3)
where Col1 >= "&DATEVALUE(EOMONTH(TODAY(), -4)+1)&"
group by Col2
label avg(Col3)''")
spreadsheet demo

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:
IFTTT inputs the data as text: how do I use the DATE function to reformat the cell data for each date?
The "button" we're using represents 30 mL of milk but in a single meal he may eat much more - so we're pressing the button multiple times. What array formula can I use to add all formula for each day?
Here's a link to a sample spreadsheet so far. https://docs.google.com/spreadsheets/d/1ds_IvgS5JWuFmsEipk-wUcsfGQVSVD1tXPydDCoT7Xo/edit?usp=sharing
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))
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.

Google Sheets Formula cannot get the date from another cell

I want to get the price of bitcoin on exact date.
The dates are written in Column A and they are updated regularly from a Google form
This is an example of the working formula, but the date in it is written manually (2017-01-31):
=ARRAYFORMULA(IF(ISBLANK($B$2:$B),"",CRYPTOFINANCE("BTC/USD", "price",2017-01-31)))
But when I try to get the dates from Column A, mentioned with $C$2:$C - Google sheets do not understand it
=ARRAYFORMULA(IF(ISBLANK($B$2:$B),"",CRYPTOFINANCE("BTC/USD", "price",$C$2:$C)))
Click here to check The spreadsheet
Thank you in advance!
"Doctor, it hurts when I do this."
In the example spreadsheet you are converting the dates into text for the column C, using the explicit TEXT() function. Then you are wondering why they no longer work as dates?
Stop converting to text.

Dollar symbol not getting summed in Google spreadsheet

I want to manage my expenses using a google spreadsheet. The problem is that I use dollars and euros. I write the numbers like $23 and €25. The sum function works properly for the euro symbol, but it returns zero for the $ sign.
I set up a small example here:
https://docs.google.com/spreadsheets/d/1_mg6xxsae2ybDHXQAqGLddXmJMDsYaaGkkhRY2YIIQc/edit#gid=0
Both columns has the same sum function, but only one works. Why?
Thanks in advance.
---EDIT:
I updated the example with some data of the real world. And I changed the timezone of the spreadsheet to the one that corresponds to me (spain). I highlighted two examples in the sheet2. As you can see, the examples are using the correct currency format, but the sum stills zero. The same configuration in the sheet1 works nicely.
I'm starting to think the problem is the timezone of the spreadsheet.
https://docs.google.com/spreadsheets/d/1Hi8DDafrej7544mVEj1e4iEI-j6n6Vu2LttYaDYurOg/edit?usp=sharing
The same addition works for the sheet above.
I formatted column A it as Currency $ and Column C as Currency British Pound (There is an option when you click at Format to add more currency and there you can pick Pounds). Looks like the addition works in this case.
$ is a character used in formulas to anchor row or column references. Try writing the number without symbols at all, and instead set the format accordingly instead.
http://www.gcflearnfree.org/googlespreadsheets/14.3

How to Count Timestamp on Google Spreadsheets?

My responses are timestamped as soon as anyone submits a survey. I wanted to count those timestamp monthwise.
URL - https://docs.google.com/spreadsheet/ccc?key=0AkpZp6MVqYv1dE5SZjJIODB1WF9nZDR6b1ZJZjFPenc&usp=sharing
I wanted to find out number of positive responses for a particular question (lets say Q1) for a particular month (lets say May)
Column G is not founded out based on the timestamp of Q1, I had asked the user the month, but that's not the correct way to do so, so I have stopped asking the user to enter the month.
First you have to overcome the fact that the timestamp isn't compatible with googles date format. No biggie,... luckily it looks like you have a fixed format ie DD/MM/YYYY. So you can use the LEFT and RIGHT formulas like so =right(left(a2,5),2) This will give you the month in text, ie 05.
Great.
Now for the harder stuff. If you have the newer google spreadsheets, you can simply use countifs to the effect of:
=countifs(arrayformula(right(left(A$2:A,5),2)),"=05",B$2:B,"=Positive")
For each month, replace the "=05" with the the date number you want. You could also make a month lookup chart for all months and questions so that you don't have to modify the formula for each month and quesiton. For this you replace the "=05" with =[cell number containing month number as text] (NOTE: for making a lookup key, you will have to pay close attention to the fact that you are getting TEXT in the formula above vice a number. There is a difference and they are not compatible as-is.)
Let's say you don't have the new google spreadsheets. Then you can use the old sumproduct() and if(). Yes, it is old. See the following:
=sumproduct(arrayformula(if(right(left(A$2:A,5),2)="05",1,0)),arrayformula(if(B$2:B="Positive",1,0)))
Note in both of these, you need to use arrayformula to convert the column with the timestamp into something useable. If you want to make this part easier by removing the parseing functions (LEFT() and RIGHT()) you need to change the timestamp format to be MM/DD/YYYY. Then you can plug in the the MONTH(DATE) formula and it will be done.
Then make a master sheet like so (note my formula has a "'" in it to make it visible for purposes of demonstration, you should remove it.):
Careful inspection might note that the count is wrong. That is because when I imported your timestamps, times like "02/06/2014 ..." were interpreted to mean "February 06" because of google's auto-formatting. In your sheet you will get the correct count using this formula, because of the way your timestamp is auto-populated.
HINT: To make the month a text you need to enter ="05" in the Month column
Please let me know how you make out.

Resources