Excel display dates horizontally - excel-formula

I am trying to develop an Agile sprint spreadsheet that takes into account the effort spent on each task on each day.
At the top of the sheet i have two fields, Start date and Sprint Duration.
What i want to achieve is underneath this, display the dates, starting at the first date and extending horizontally to the right.
Is this possible to achieve?
Today 7/19/2018
Duration 14
Start 7/19/2018
End 8/2/2018
Task Estimated Effort Actual Effort 7/19/2018 7/20/2018 7/21/2018 7/22/2018
Data Migration 10 5 2 3
Design 7 7 3 4
Groups 1 7
Where the dates displayed are displayed dynamically as outlined in the question above

Using Duration in B2 and Start Date in B3 you could use these two formula:
The first date in cell D6 (7/19/2018) is the Start Date and will always be visible, so a simple formula can grab that:
=$B$3
The rest of the dates needs to check if the previous date is less than the Start Date plus Duration days. If it is then put the previous date plus 1 day, if not then leave the cell blank. The formula is placed in cell E6 and dragged across as far as you need.
=IF(D$6<SUM($B$2:$B$3),D$6+1,"")

Related

N-Count Days For Changing Dates For Ecommerce Shipment Sheet

I have to submit a daily MIS for orders which are Undelivered For less then 2 Days, Undelivered Between 3-5 Days and 5+ Days.
Currently i'm doing this manually by counting from the Purchase Date forward. So e.g. for an order of 11th March, i'll just count 2 days till 13th (If undelivered) and type 1 in front of the column and do a count manually of all orders outstanding in each column.
The problem arises as the column descends and the dates get further and further away from current day.
This is tiresome but i can't seem to find an algorithm that can do this automatically.
Can anyone help please.
Consider this screenshot:
Cell A1 has the date you want to compare to. Don't user the Today() function, since it is volatile and can slow down the workbook. Just manually put in the desired date.
The formula in cell E2 is
=IF(D2="undelivered",IF($A$1-C2<=2,"less than 2",IF($A$1-C2<=5,"3 - 5 days","5+ days")),"")
In words: if the status is "undelivered", calculate the difference between purchase date and A1. If it is less than 2, return that text, if it is less than 5, return that text, otherwise return the third text.
Copy that formula down.
In cells G3 to G5 you see each of the three texts and next to it is a formula. Starting in H3
=COUNTIF(E:E,G3)
copied down to H5.
Your layout may differ, so you will need to adjust the formulas accordingly.

Auto populating the 31st day of a given month in excel

I am building a template for a data entry spreadsheet at work for some of the old-timers. The template that they will see will be columns of categories and the rows will be dates including the day of the week. I know how to auto-fill the date an day by drag and drop, but honestly some of these guys even screw that up. So, I am building this spreadsheet that auto populates the date and the day for the whole month based on entering the first day of the month that way its as simple as possible, but I am having trouble with the 31st day of some months. I don't want to have two different spreadsheets. Right now the code that I have is:
=EOMONTH(A5,0)
This works if it is the 31st day of the month, which is great, but if it is not a month that has 31 days it repeats the 30th day. I'd really like it to be an if statement, but I know my code is off because it always generates a FALSE.
Is =if(A5(M<2),"EOMONTH(A5,0)") heading in the right direction? It generates a #REF! reponse with that code.
Thank you for any input!
In A5 enter the date of the first day of the month. In A6 enter:
=A5 + 1
and copy downwards.
In A35 enter:
=IF(DAY(A34+1)=1,"",A34+1)
This assumes that you are making the date sequence by adding 1 to the cell above.
EDIT#1:
Put this in A6:
=IF(A5="","",IF(DAY(A5+1)<DAY(A5),"",A5+1))
and copy downwards through A35.
This will handle long months, short months, leap years, etc.
(this also has the advantage of maintaining the same formula for the entire set of cells)
You just need to add an IFERROR before the IF to fix the February problem:
=IFERROR(IF(DAY(A34+1)=1,"",A34+1),"")

How to get a bill to populate with the amount, only if the particular payday falls exactly on or 6 days before the due date?

=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

Calculate stock duration from today

I have a spreadsheet which shows me the inventory of my stock.
Product name Qty Average orders/month Stock available until:
Product1 100 10 xx/xx/xxxx
I would like to calculate, using today date, the estimated date my stock will be at 0.
In this example I have 100 / 10 = 10 month from today.But how can I get the date difference? ie convert 10 months from now into a date
Also I know how to change background color according to specific values of the cell, but how can I do the same for the amount of days between today and the estimated date?
Thanks for your help
=date(year(today()),month(today())+10,day(today())
The above formula we put you on the same calendar date that is 10 months after the current month. The number of days between today and that day 10 months from now will vary as the number of days in a month changes. You will also get some slightly unexpected results when you try to find the 30th day 10 months from April since February only has 28/29 days. it will actually tell you early march which is technically 11 months away.
Where you see 10 in the formula above, replace it with your equation that will calculate 10
Since you will be dealing with fractions of a month, you will need to determine a way that suits your needs to convert that into number of days. My personal recommendation is you treat every month as having 30 days. so 10.5 months is really 10.5*30=315 days. So the formula above would become:
=today()+315
or
=today()+10.5*30
So in this case replace either the 10.5 with your formula that calculates months or replaces 315 with your formula that converts fractions of a month into days. Note days will need to be an integer so consider rounding your results ROUND(results,0) or INT(results).
As for changing your cell colour based on conditional formatting, lets assume your end date is in the D column. Select the range in the D column making sure your active cell is D2 (by default this would be the cell with the white background and is the first cell clicked on to start the last selection drag). Go into your conditional formatting and select formula ando for your logicinal condition to return true you and have the colouring take effect you want to use a formula like:
=D2-today()<=21
That should evaluate true or false.

Excel Formula - How to extract date from a week with custom start date?

Click for diagram explanation
Hi guys,
I have managed to find out formula for counting week 1 from custom start date and not from start of the year. (see first diagram above) I've achieved this by entering date manually and having a formula in week cell.
"**Week #"** =TRUNC(((A2-A1)+6)/7)+(WEEKDAY(A2)=WEEKDAY(A1))
Now I want to do it the other way round, rather than type in date every time, I want to type in a week number, relating week number from custom start date that would then be translated into proper date.
10 weeks later would simply be taking your start date adding 7 times the number of weeks or in this case 70 days. Assuming your start date is in C2 and your number of weeks from C2 is in C4, then your formula would be as follows:
=(C2-1)+7*C4
As for your week number formula, you may want to consider changing it to:
=WEEKNUM(I3,2)-WEEKNUM(I2,2)+1
Where I2 is your start date and I3 is your second date. The 2 in the weeknum formula is to tell it your week starts on a Monday.
Based on your comment about different years you could try:
=(WEEKNUM(I3,2)+52*(year(I3)-Year(I2)))-WEEKNUM(I2,2)+1

Resources