Another formula request - excel-formula

This time I would like help creating a formula that calculates a payment every 28 days (28 days, continuously, not 28 day of month).
Here's an example of how I intend to use the formula:
I have online newspaper access and I am billed to my credit card every 28 days. I am next due for billing at 9 February 2017.
So I want to write a formula that will calculate the result of =(5*4), every 28 days, starting from 9 February 2017. Otherwise, show $0.00 (eg 0*0).
As always, I appreciate any assistance.
Thank you.
Matthew

If you are simply dragging the formula down, you can use the following formula assuming your start date 9/2/2017 is in A1:
=IF(MOD(ROW(A1),28)=ROW($A$1),5*4,0)

Related

MS Excel how to proporationately spread $ values over years

Hi All and thank you in advance for any help.
I have several projects that start and finish in different years and want to spread the contract value proportionately over each year. For example a project might start on 1 July 2020 and end 30 June 2022 with a value of $20 million. So how would I automatically populate a value for each of these years, this example would have $5m in 2020, $10m in 2021 and $5m in 2022. The issue is I have about 100 projects that have started since 2013 and some are not due to finish until 2024 so some degree of auomation will help me. I have set up a spread sheet as follows
Excel spreadsheet
Hope this makes sense and any help will be much appreciated.
Good Day,
Try the following formula in the "Contract Days per Year":
=MAX(0,MIN(DATE(E$1,12,31),$B3)-MAX(DATE(E$1,1,1),$A3)+1)
Then you will just multiply the result in the "Contract Value by Year"
for 2019 year, copy the values under 2018 and paste it under 2019
hope it helped

Excel - SUMIF Function

I made a worksheet covering meal expenses for a set period of time (01-08-2020 until 31-08-2020.)
The company will pay up to 75kr, Monday-Friday.
The list covers expenses 7 days a week, If the amount is greater than 75 on Monday-Friday, I have to pay the extra expenses. (This I have figured out correctly). Saturday and Sunday I have to pay fully.
So my question is, how can I sum this and exclude Saturday and Sunday?
Attempt 1:
I tried this formula (Norwegian excel. Summerhvis = SUMIF. Lørdag = Saturday):
=SUMMERHVIS(B2:B32,"<>lørdag", G2:G32)
It seems to be partly correct however, I miss Sunday, how can I add Sunday to this equation?
Attempt 2:
I used this formula:
=SUMMERHVIS(B2:B32,B2:B6,G2:G32)
It gave the correct answer but the answer was layered in 5 rows. I then summed this in P8.
Where I want the answer is in G32. So in G32 I wrote =p8.
It must be an easier way of doing this?
You can use SUMPRODUCT and the WEEKDAY function:
=SUMPRODUCT((WEEKDAY(A2:A32,3)<5)*G2:G32)
According to the Microsoft function translator, this might be, in Norwegian:
=SUMMERPRODUKT((UKEDAG(A2:A32;3)<5)*G2:G32)
If you really want to use SUMIF and your text days, one way would be (in English):
=SUM(SUMIF(B2:B32,{"Monday";"Tuesday";"Wednesday";"Thursday";"Friday"},G2:G32)),
or, if your weekday days are in b4:b8:
=SUM(SUMIF(B2:B32,$B$4:$B$8,G2:G32))
but I'd advise against it as it would only work in the language of the text days of the week. Also, I note your days of the week don't seem to match up with what the days of the week were in the US. For example, here 1 Aug 2020 was a Saturday, so another possible cause for error (unless I am not understanding the dates correctly).
The above is the same as summing five separate SUMIF equations, each for a desired day of the week.

how to calculate time difference in excel working hours only

How can I calculate hours worked on a project using specific working hours that aren't the same each day?
So Monday - Friday I work 7 am-7 pm, Saturday 9 am -1 pm and I take Sunday off (lucky me). If i start a project on the 1st March 10 am and finish on the 5th March at 9 am how can I calculate an answer of 27 hours ??
I have two cells date/time start and date/time finish. I have multiple rows to do this to and several time points but this essentially will work the same.
I hope makes sense.
Edit - Solutions tried and opposing results
You will need a helper column with this formula:
=24*(SUMPRODUCT((TEXT(ROW(INDEX(AAA:AAA,$F$1):INDEX(AAA:AAA,$F$2)),"dddd")=A1)*(C1-B1))-IF(TEXT($F$1,"dddd")=A1,MOD($F$1,1)-B1,0)-IF(TEXT($F$2,"dddd")=A1,C1-MOD($F$2,1),0))
Then sum that column.
Here it is in one formula using NETWORKDAYS.INTL
=IF(DATEDIF(F1,F2,"d")>1,NETWORKDAYS.INTL(F1+1,F2-1,"0000011")*12+NETWORKDAYS.INTL(F1+1,F2-1,"1111101")*4,0)+IF(DATEDIF(F1,F2,"d")>0,(MOD(F2,1)-IF(WEEKDAY(F2,2)<6,TIME(7,0,0),TIME(9,0,0)))*24+(IF(WEEKDAY(F1,2)<6,TIME(19,0,0),TIME(13,0,0))-MOD(F1,1))*24,(F2-F1)*24)

CountIfs with Multiple Criteria?

I have a table like this:
Date Paid Days Late Date Paid Days Late Date Paid Days Late Date Paid Days Late Date Paid Days Late Date Paid Days Late
Utilities Admin Utilities Admin Utilities Admin
Company January January January January February February February February March March March March
Wayne Enterprises 2/15/2016 5 10-Feb 0 3/11/2016 1 4/15/2016 5 4/25/2016 15
Stark Industries 2/12/2016 3 2/8/2016 0 3/19/2016 10 3/8/2016 0 4/15/2016 5 4/1/2016 0
(I suggest though looking at the screenshot to see how it's laid out, as the pasting into here isn't very pretty, any tips? Here's a link to this on Google Spreadsheets).
How can I, in N4, create a formula that will count the number of months what have a late report (defined as any "Days Late" over 0). Obviously, I can do this:
=COUNTIFS(B1:M1,"Days Late",B4:M4,">0"), which returns 4.
For Wayne Enterprises, in March, both Utilities and Admin were paid late. However, this should only count as 1 month. How can I somehow add to my CountIfs() a statement that is like "if two values in the same month are greater than 0, treat as ONE month"?
I tried also doing something like:
=COUNTIFS(B1:M1,"Days Late",B4:M4,">0")/COUNTIFS(B1:M1,"Days Late",B4:M4,">0")+1
But that doesn't quite do the trick either. Thanks for any ideas. (Of course, if CountIfs() isn't the best way, I'm open to any other formulas! I have a sneaking suspicion SumProduct() might be an alternative) I'd prefer a formula solution over VBA, but if absolutely necessary, we can do a UDF perhaps.
Edit: I could create yet another helper column that compares a single month's Utilities and Admin, and if one or both are late, put 1, then just Countif() that column has 1 in it...but I'd rather not keep creating columns if I can help it, as I'll be doing this for 12 months.
Use this Array formula:
=SUM(IF(($B4:$M4>0)*($B$1:$M$1="Days Late"),1/COUNTIFS($B$3:$M$3,$B$3:$M$3,$B4:$M4,">0",$B$1:$M$1,"Days Late")))
Being an array formula it must be confirmed with Ctrl-Shift-Enter when exiting edit mode. If done properly excel will put {} around the formula.
As per your new data use this:
=SUM(IF(($B5:$BI5>0)*($B$1:$BI$1="Days past 10th of Following Month"),1/COUNTIFS($B$3:$BI$3,$B$3:$BI$3,$B5:$BI5,">0",$B$1:$BI$1,"Days past 10th of Following Month")))
The helper row of months in row 4 is not needed.
EDIT #2
My bad I forgot that when using formulas that return "" will cause an error so lets put in a check for that:
=SUM(IF(($B5:$BI5<>"")*($B5:$BI5>0)*($B$1:$BI$1=$AS$1),1/COUNTIFS($B$3:$BI$3,$B$3:$BI$3,$B5:$BI5,">0",$B$1:$BI$1,$AS$1)))

Having a date take effect at a specific time of day

I have the below excel formula that I need some help adjusting
=MOD(DATE(2015,6,20)-TODAY(),-14)+TODAY()
The formula in it's current state works well however what I want now is to modify it to have it kick in at 5:01 PM.
For example the formula will display 5/23/2015 each day until I get to the 6th of June. From June 6th it will display 6/6/2015 until June 20th (14 days later) and so forth. What I want however is for the actual date change to occur at 5:01 PM. So for example on June 6th at 5:01 PM the date change will then take effect.
Is there a way to do this?
Thanks in advance for any help you can provide.
Adding the time you want to the date and then subtracting by NOW() instead of TODAY() should work:
=MOD((DATE(2015,6,20) + TIME(17,1,0)) - NOW(),-14)+TODAY()

Resources