I have three columns "Month Name" "Team" and "Mismatch%
I have 8 months of data for each and I am trying to calculate 3 months rolling average as shown in the below table.
Every time the team changes the first two months should be blank as shown in the image. Currently I have data from Fiscal Month June to January hence June and July should be blank. If i have data from Fiscal month July to Feb then July and August will be blank and so on.
enter image description here
enter image description here
I tried my luck using Offset and average function in excel. But did not get the desired results. If anyone could help me to write a condition or formula to keep first two months cell blank and then calculate average will be very helpful.
Awaiting your positive response!
Thanks,
G
Place this in cell D4 and copy down:
=IF(COUNTIF($B$2:B4,B4)<=2,"",AVERAGE(C2:C4))
Related
I am trying to come up with an Excel Formula to calculate 6 Months average value from Monthly prices.
A year is considered from April 2022 to March 2023 and so on. That means from April 2022 to Sept 2022 it is Half 1 and Oct 2022 to Mar 2023 it is Half 2.
Total time line is till March 2055. So, the formula has to be dynamic.
Please advise how I can use a formula for this averaging task.
The Data table look like below.
INPUT
Please refer the link to picture
OUTPUT
In Yellow in the picture below
Table Pic
Thank you!
It would be fairly simple if we had 'regular' half-year periods. Since half-years are shifted 3 months forward, we also need to shift the formula by three months. To achieve that, we have an OFFSET function that we can apply for the prices row. It will work fine for all the half-year periods with the exception of the first one since we'll have the prices range shifted. So, for the first half of 2022 in the cell B9 we will simply write =AVERAGE(B5:G5) and for all the rest, starting from C9, -
=AVERAGEIFS(OFFSET($B$5:$OG$5,0,3),$B$1:$OG$1,C7,$B$2:$OG$2, IF(C8=1,"<="&6,">"&6))
assuming that the months start in column B like in your example picture and finish in column OG as suggested from your task description.
If you want rolling 6mo periods, I prefer INDIRECT to OFFSET.
Assume the data runs vertically, each month is a separate row, and "X" is the cell of the latest value, this should work:
=AVERAGE(INDIRECT(ADDRESS(ROW(x), COLUMN(X))&":"&ADDRESS(ROW(X)-5, COLUMN(X))))
I would like to know what is the formula to know the average cost of the last 12 months for each expenses that I have with the current month and that keeps the last 12 months average as the months go by?
To be more precise and for example: now we are in January 2021, I would like to know the average cost from January 2020 to December 2020 for INTERNET
Here's an image of the data:
Here's an image of the tab I want to enter the formula (in cell C2):
Thanks in advance for your response and let me know if my query is not clear enough. Have a good day/evening!
P.S.Sorry for those who can't read french, the file is in french but the dates are formatted in english and for the cost column, it's pretty much universal . I've modified the average column in english (column C in "Budget" tab) to let you know where I want to put the formula.
Use AVERAGEIFS with EDATE:
=AVERAGEIFS('Despenses'!E:E,'Despenses'!G:G,A2,'Despenses'!C:C,">="&EDATE(EOMONTH(TODAY(),-1)+1,-12))
So I am trying to calculate rent for each month. The problem I am facing is with the fact that starting date and ending date could be in the middle of a month.
For example:
Rent = 10,000
Starting date = 15/04/2020
Ending date = 10/10/2020
I want my excel Sheet to split accordingly as below:
First sample row of the excel
In my excel sheet, I have different amounts for rent and various start/end dates.
This is what I have tried but failed miserably:
> =$F3/(12*DAY(EOMONTH(H$1,0)))*(IF(MONTH($C3)<=MONTH(H$1),IF(MONTH($C3)=MONTH(H$1),(EOMONTH($D3,0)-$D3),DAY(EOMONTH(H$1,0))),0))
Where F is where the RENT is, H1 is January, C3 is start date, D3 is end date. I'm hoping it to work when I autofill the formula across the whole sheet.
Please help!
#Hooded0ne I tried your formula for all examples in my sheet and there seems to be an issue for some cases:
When start date is 2019 and end date is 2020. This should only show rent till April.
Same case as above, December 2020 is only till the 14th, it should only calculate for the first 15 days
Blockquote
Does this work for you?
=MAX((MIN(EOMONTH(K1,0),$D$3)-MAX(K1,$C$3)+1)/DAY(EOMONTH(K1,0))/12*$F$3,0)
Edit: It should work for multiple years, if you have a specific example, please add it to your original post.
=IF(AND(DATE(YEAR(EE$2),MONTH(EE$2)+IF($B6<DAY(EE$2),1,0),DAY($B6))>=EE$2,DATE(YEAR(EE$2),MONTH(EE$2)+IF($B6<DAY(EE$2),1,0),DAY($B6))<EE$2+14),470,”")
Using Google Sheets to make a budget (See attached image snapshots). I’m a little bit stuck on a complex spreadsheet formula (listed above). What I’m trying to do is get a bill to populate with the amount, only if the particular payday falls exactly on or 6 days before the due date. Here’s what I’m working with:
Column Headers: I have set these cells so that they auto-populate with the payday, which happens every week on Friday.
Row 6 and 7 are where I want the amount to show up. I’ve been having to put them in manually, but I’d like to automate it for the length of the bill (60 months)
Column B, cells (B6 & B7) are set with a plain text number corresponding to the day of the month it’s due (i.e. 5th of each month for the Ford). So B6 cell has number 5 in it.
If the due date for the Ford Car Payment is the 5th of every month, I need the number $470 to populate into the cell if the date above the column is the 5th of the month or minus 6 days from it. Because the bill doesn’t always fall on a payday, as in the in EE or EF Column, it needs to populate with $470 on the EE6 cell to make sure the bill is paid on time.
Essentially, I want to be able to paste the formula into the 6th row, and have it only populate on the pay date closest 5th of each month, but not after the 5th. If it returns 0 like on cell ED6, the cell should remain blank.
Any ideas how I can make this possible?
=IF(ISNUMBER(MATCH($B5, ArrayFormula(DAY(C$3+{0,1,2,3,4,5,6})), 0)), 470, "")
Using C3 as the start assuming your calendar days start at C3.
The way this works is:
ArrayFormula(C$3+{1,2,3,4,5,6}) Generates a synthetic Range of dates starting at the date in C3 and the week following
ArrayFormula(DAY(C$3+{1,2,3,4,5,6})) just extracts the day's number of the month from all the dates. A date range from 2017-01-28 - 2017-02-03 would leave you with {28, 29, 30, 31, 01, 02, 03}
MATCH($B5, <2>, 0) Will try to find the Due month-day in the month-day list we just generated and return the position or an error if it is not there.
ISNUMBER(<3>) will be TRUE if the day is contained, otherwise false
IF(<4>, 470, "") Prints the payment on the correct dates, of course you can change 470 to a cell reference like $ZZ5.
You can drag this formula right and down
I am creating a Table in excel to help determine what the Bi-annual dates would be from an input date.
Example: If the start date of an agreement is 9/1/2017 and Ends 8/31/2018, the Bi-annual dates would be 2/28/18 and 8/31/2018. Dates of service would be 2 months before the end of the agreement period, and six months before the second service date (so 6/30/2018 and 12/31/2017 respectively).
Formula for this:
=IF(ISBLANK(O3), "",IF(EOMONTH(A1, 0)=EOMONTH(O3, -2), "BIANNUAL", IF(EOMONTH(A1, 0)=EOMONTH(O3, -8), "BIANNUAL", "")))
Where A1 refers to January, B1 would be February, and so on thru to December (L1). O3 is the Agreement End Date box, and will be static on the sheet. This formula work perfect for me.
What I am trying to get is a formula for the cells at the top that list the months (Jan-Dec). I need a formula that will put the date as 1/31/2018 for Jan, 2/28/2018 for Feb, 9/30/2017 for September (for the current year since September has not passed). The actual day needs to be the last day of the month, and if that month has passed, then the year should be for next year. I have been playing with the DATE function, but cannot get it nailed down.
What I have so far - January 2018:
=DATE(YEAR(TODAY()+365), MONTH(42766), DAY(EOMONTH(42766, 0)))
This works, but not each month will be in 2018. I need the year to change only after the month has passed.
I feel like I'm either over complicating things, or I need a way more complex formula. Please help.
In A1 place the following formula and copy right to L1 or as far as you need to go
=EOMONTH($O$2,COLUMN(A1)-1)
It will display the end of month dates starting with the starting month of the contract and increasing by 1 month for each column you move right.
In the image below, it is the same formula in row 1 and row 2. Row one I choose custom format instead of date and set the custom format to mmmm. 4 m's will give you the full month, and 3 m's will give you the 3 starting letters of the month.
I actually figured this out this morning just playing with the IF function. My goal was to have the sheet update itself without having to change the dates every time your open it. So that the file could be shared with others and all you would have to enter is the end of the contract date, and it will list out Biannual, Tri-annual, and Quarterly months (see image).
Formula:
=IF(DATE(YEAR(TODAY()), MONTH(42766), DAY(EOMONTH(42766, 0)))<TODAY(), DATE(YEAR(TODAY()+365), MONTH(42766), DAY(EOMONTH(42766, 0))), DATE(YEAR(TODAY()), MONTH(42766), DAY(EOMONTH(42766, 0))))
Where I used the serial for each month (in this case 1/31/2017, as I didn't need to worry about the year)
Results