This is my first time posting and I hope someone can help.
I am not sure how to word this - here is my best go...
Please see example spreadsheet
Below I explain what I am trying to achieve that corresponds to the spreadsheet:
Clients pay a setup fee in a certain month - (B5)
I identify through a formula the month that the fee occurs - (C5).
There is a certain number of months (B7) after the fees start to roll out based on the fee schedule (Row 3)
4. DESIRED OUTCOME (Row 12) - I would like a formula that understands that the fee is paid in Month 3, then from Month 7 will roll out the start of the fee schedule from Row 3 (starting from Month 1, automatically)
Hope this all makes sense - please let me know if I can clarify anything and very much appreciate any help.
try:
=ARRAY_CONSTRAIN({SPLIT(REPT("0×", C5+B7-1), "×"), SEQUENCE(1, 12, 50, 10)}, 1, 12)
Related
I'm succesfully using the formula provided here in an answer here: Get date from week number in Google Sheets
So, I have:
=DATE(2023,1,1)-WEEKDAY(DATE(2023,1,1),3)+7*(WEEKDAY(DATE(2023,1,1),3)>3)+7*(C2-1)
Where C2 is a cell with the week number, and I'm getting the expected result 02/01/2023.
What do I need to change to get the result of 08/01/2023? - the last date of the week?
Thank you again for all of your help!
Part of my problem is probably that I can't work out what the bold parts refer to/mean/do:
=DATE(2023,1,1)-WEEKDAY(DATE(2023,1,1),3)+7*(WEEKDAY(DATE(2023,1,1),3)>3)+7*(C2-1)
To get a date that is 6 days later than the formula result, add 6 to that result, like this:
=6 + date(2023, 1, 1) - weekday(date(2023, 1, 1), 3) + 7 * (weekday(date(2023, 1, 1), 3) > 3) + 7 * (C2 - 1)
See Working with date and time values in Google Sheets.
Your formula looks unnecessarily complex. It is likely that there are much easier ways to get those dates, depending on your requirements.
you can try:
=LAMBDA(aix,MAX(FILTER(aix,WEEKNUM(aix,21)=C2)))(SEQUENCE(365,1,DATE(2023,1,1),1))
apologies for the very basic question but I've created a home-made expenses tracker on Google Sheet just for fun and to improve my skills but I'm struggling to make this formula work.
In tab 1 I have a calendar that looks like this:
In tab 2 I have all my transactions:
My idea was to use sumifs in tab 1 so that for the earnings I can sum all transactions that were done in December 2022 and define that all amounts need to be greater than 0, similarly, for the expenses, all transactions would be less than 0.
I did try this formula which obviously doesn't work as I don't know how to specify whether transactions need to be greater or less than 0:
=SUMIFS(transactions!$D:$D,transactions!$A:$A,$B3,transactions!$D:$D,transactions!D3>0)
I'd really appreciate your help, thank you!
try:
=SUM(FILTER(transactions!D:D, transactions!A:A=B3, transactions!D:D>0))
or:
=BYROW(B3:B11, LAMBDA(x, SUM(
FILTER(transactions!D:D, transactions!A:A=x, transactions!D:D>0))))
I have a sheet consisting of entries that look like this, which I use to keep track of when the members of my family are at home:
DateTime
User
In/Out
5/29 13:00
Mike
In
5/29 13:05
Fred
Out
The rows are added via automation from everyone's phone using IFTTT. I have some flexibility in the format, but not a lot.
I would like to create a cell that changes ONLY when everyone is out of the house. Another IFTTT rule will watch that cell, and when it changes it will start the roomba. So the cell should NOT change if anyone returns home, it should only change if everyone has left.
One way I can think to do this is to set the watched cell to the last timestamp when everyone has left the house. That way, it will only update to a new value when everyone has once again left. Anytime there's a new row, if the status of everyone is Out, it will update the last timestamp.
I'm having a little trouble composing the formulas to keep track of when everyone is Out. This involves looking back through the most recent entries and finding the last time everyone who isn't the current user was out. I figure I can use a filter and a reverse sort and a lookup for every row in the table, but this seems a little complicated and inefficient.
Is there a better way to accomplish what I want?
you could track it like:
=SORTN(SORT(B2:C, ROW(B2:B), 0), 9^9, 2, 1, 1)
and then:
=SUMPRODUCT(INDEX(SORTN(SORT(FILTER({B2:C,
ROW(B2:B)}, B2:B<>""), 3, 0), 9^9, 2, 1, 1)="Out",, 2))=
COUNTUNIQUE(B2:B)
where:
TRUE = everybody out
FALSE = someone in
to get a time when house is empty:
=IF(SUMPRODUCT(INDEX(SORTN(SORT(FILTER({B2:C,
ROW(B2:B)}, B2:B<>""), 3, 0), 9^9, 2, 1, 1)="Out",, 2))=COUNTUNIQUE(B2:B),
INDEX(SORTN(SORT(A2:C, ROW(B2:B), 0), 9^9, 2, 2, 1), 1, 1), "someone home")
I think I got it, many thanks to player0.
The columns in yellow are written by the IFTTT automation. Columns D and E are set to the status of Mike and Carrie, as of that time. D3 is set to:
=INDEX(TRANSPOSE(SORTN(SORT(A$2:C3, ROW(B$2:B3), 0), 9^9, 2, 2, 1)),3)
and filled down for the rest of column D, which also populates E.
Once you have a row with a timestamp and everyone's status, it's a relatively simple thing to pick out the latest row where everyone is out. Cell G4 is set to:
=INDEX(SORT(FILTER(A2:E,D2:D="OUT",E2:E="OUT"),1,FALSE),1,1)
In this example, it shows that the last time everyone was out was on 6/5, which is correct. As more rows are added, the value does not change again until the next time everyone is out, which is important for the automation that watches that cell for changes to know when to start the vacuum.
I am definitely open to more elegant solutions that don't need to drag a formula down column D, but for now this one seems to do the job.
Sell / Buy
Buy
Buy
Sell
Hi all,
I have google sheet that has a lot of Data However, i want to count number of "Buy" and "Sell" based on filtering the dates NOT the whole column ONLY VISIBLE rows
The code i'm trying to use is the below
=SUMPRODUCT(SUBTOTAL(9,OFFSET(E4,ROW(E4:E100)-ROW(E4),,1)),--(E4:E100 = "Buy"))
i'm really having bad time solving this issue, i would greatly appreciate if someone can help me with the code.
thank you.
add column of SUBTOTAL
=SUBTOTAL(103, B4)
hide it:
then use:
=COUNTA(IFNA(FILTER(B4:B, C4:C="buy", D4:D=1)))
=COUNTIF(D4:D, 1)
="Buy: "& COUNTIFS(C4:C, "buy", D4:D, 1)&
" Sell: "&COUNTIFS(C4:C, "sell", D4:D, 1)
What I'm looking for, say I have a
Google Sheet: Col A - row titles such as conversions, page views etc.
Col B - January & stats
Col C - February & stats
You get the idea.. now, for 2019 I could now pull data until March. What I'd like is that at the end of April, I could use the GA addon schedule function and EOMONTH to automatically pull in all of April's data.. and then create a column next to March filling in the data? So basically, every month it would move one column to the right.
I'm decent at using Python / SQL so would be open for suggestions but I'm quite limited in what I can use (IS department doesn't like me installing things other than Excel...). Is this possible and what I could use and then I can Google to find out more?
At the moment what I do for weekly reports is have the data automatically refresh Monday morning, then I copy/paste the data into the appropriate column.
paste in B1 cell and drag to the right:
=ARRAYFORMULA(TO_DATE(ROW(
INDIRECT("A"&EOMONTH(DATE(2019, COLUMN(A1), 1), -1)+1):
INDIRECT("A"&EOMONTH(DATE(2019, COLUMN(A1), 1), 0)))))