Google Sheets Date Formula - google-sheets

I have a personal finances Google Sheet with all my expenditures (column A) and corresponding dates (column B) of the month when they are due to be paid.
I would like to create a formula that shows me what is left for the remainder of the month depending on what day of the month I am looking at the sheet.
Something like, ifDate is today, sum all remaining dates of the month expenses.
TIA

Use this formula it works even if the dates is disordered.
=SUMIF(C2:C,">"&F2,B2:B)
Update
=SUMIF(D3:D,">"&TODAY(),C3:C)

Related

Google sheets Product function with Month comparison

I want to multiply a range by another range in another sheet only If a month in a date from a range matches the month in another range in another sheet.
Technically:
Multiply $R$8:$R$1007 by Start!$L$13:$L$24 If ARRAYFORMULA(TEXT($N$8:$N$1007,"MMMM")),"="&Start!$K$13:$K$24
Edit: here's a sample of my tables:
https://docs.google.com/spreadsheets/d/1A0zZ1BvRnjeQQjsf4RoRGesOPNYOJWzlr9Kh2oYto-Y/edit?usp=sharing
I want the income from US dollars to another currency with conditions.
So in other words column T in sheet Transactions to be equal to the multiplication of the income in US dollars by the exchange rate in column L in sheet Start only If the month from column N equals in sheet Transactions the column K in sheet Start.
How can I right turn this into a functional formula, please?
try:
=ARRAYFORMULA(IFERROR(VLOOKUP(MONTH(N8:N),
{MONTH(Start!K13:K24&1), Start!L13:L24}, 2, )*R8:R))
Based on the limited information of your sheets. The following would multiply and sum each range if the months are matching:
=SUMPRODUCT(--(TEXT(N8:N1007,"mmmm")=Start!K13:K24),R8:R1007,Start!L13:L24)

Google Spreadsheet - SUMIF Date Range

I'm trying to create a spreadsheet, in which I want to sum the table if records are older than 1 year.
I have inventory in 1 sheet with purchase date and other stuff, and in 2nd sheet, I want to sum the inventory which is older than 1 year (inspection date is a separate column in 2nd sheet)
sum B column older than year:
=SUMIF(A2:A, ">"&DATE(YEAR(TODAY())-1, MONTH(TODAY()), DAY(TODAY())), B2:B)
sum stuff between two dates:
=SUMIFS(B2:B,
A2:A, ">"&DATE(YEAR(TODAY())-1, MONTH(TODAY()), DAY(TODAY())),
A2:A, "<="&TODAY())

Need help creating a formula for dynamic average of last 4 weeks expenses

I am looking to create a spreadsheet that my staff fill out, it then gives me a master sheet with all the data, then I import dynamically to my financial spreadsheet telling me the average cost of my client over the last 30 days.
I am looking to create an AVERAGE formula of the last 30 days when Date = Today (Monday) (I want the weekday Monday as that's when staff hand in invoices)
Hope this makes sense, it's really tough!
Here's a video of me explaining my desired outcome
https://www.loom.com/share/3a9cb75052b246d1af2ba2f9ce9180a7
I've followed several guides & can't figure it out.
=ArrayFormula(iferror(query(average(if(today() - weekday(today(),3)-30)))))
I expected $90 average and I just get blank
You could use this formula:
=AVERAGE(VLOOKUP(TODAY()-WEEKDAY(TODAY(),2)+1,A:H,2,FALSE),VLOOKUP(TODAY()-WEEKDAY(TODAY(),2)-6,A:H,2,FALSE),VLOOKUP(TODAY()-WEEKDAY(TODAY(),2)-13,A:H,2,FALSE),VLOOKUP(TODAY()-WEEKDAY(TODAY(),2)-20,A:H,2,FALSE))
To break it down in to its component parts, the AVERAGE is taken from VLOOKUP results:
VLOOKUP(TODAY()-WEEKDAY(TODAY(),2)+1,A:H,2,FALSE)
The VLOOKUP is looking for the last Monday from the current date:
TODAY()-WEEKDAY(TODAY(),2)+1
Then
TODAY()-WEEKDAY(TODAY(),2)-6
and so on...
When using on your sheet, you will have to specify the column you want to reference in your look up, for colunm B (brand1) use: A:H,2,FALSE), for colunm C (brand2) use: A:H,3,FALSE), for colunm d (brand3) use: A:H,4,FALSE) and so on...
=INDEX(QUERY({INDIRECT("A2:D"&ROW()-1)},
"select avg(Col2),avg(Col3),avg(Col4)
where Col1 <= date '"&TEXT(TODAY(), "yyyy-MM-dd")&"'
and Col1 >= date '"&TEXT(TODAY()-30, "yyyy-MM-dd")&"'"), 2, )

How can I highlight cells in Google Sheets if current month?

How can I highlight cells in Google Sheets if current month?
The cells have Jan-2017, Feb-2017 etc. and not dates.
I just want the current month highlighted so that the rest of the team can keep track of our monthly stats.
I'm supposing the column that has the months is A, and that the actual values of each cell is the first day of each month (so 2/1/2017 for February for example).
Select where you want the conditional formating to go, and open the conditional formatting sidebar.
Choose "Custom Formula" from the dropdown, and paste the following in:
=$A:$A=(today()-day(today())+1)
What we are doing here is:
=A$:A$ - Look in column A for the following
today() get todays date
-day(today()) get the day and subtract it from the today in the previous point
+1 add 1 to the result because 2/8/2017 - 8 = 2/0/2017, which google sheets actually recognizes as 1/31/2017, so by adding 1 it will become 2/1/2017 which is what is wanted.
The result of this sum is then compared to the data found in A$:A$ and the results which match the sum (today()-day(today())+1) are highlighted.
Just for the record, this may work as well using conditional formatting's custom formula:
=month($A:$A)=month(today())
Considering the dates are in the column A

Google Sheets - Add range of dates based on string

Is it possible in Google sheets to have a formula which looks at a certain date and creates a range of dates based on it?
I have this google sheet:
https://drive.google.com/open?id=1ccLwh_ExEtE2zxYUor9hxi1hMyADQtuUgyCyOKASxIk
Is it possible to have formulas in the left column rows to just look at the date string "august" and automatically fill in the dates down each row? Preferably with this format I have in this sheet? Like:
monday
1
Tuesday
2
Wednesday
3
I know it's possible to format a date so it ways monday 1 e.g, but for some reason, google sheets doesn't text wrap dates and I want a line break between the day and number, if possible.
Any help truly appreciated!
Since tagged [excel-formula]:
=TEXT(WEEKDAY(DATEVALUE(1&"August"&2016)+ROW()-1),"dddd")&CHAR(10)&ROW()
in Row1 and copied down to suit should work. (For just Google Sheets this Q probably belongs on Web Applications.)
The month selection is hard-coded into the formula but could be parameterized.

Resources