enter image description hereFor example I have a start date cell and an end date cell. I also have a conditional format statement that will take these two cells and calculate the progress in % of how complete my project is.
For example:
Bathroom Renovation:
Start 11/7/2022
Finish: 11/9/2022
Progress 33%
Here is my excel code to calculate this:
=MIN(1, (DATEDIF(E11,TODAY(),"d")+1)/(DATEDIF(E11,F11,"d")+1))
I need to add an IFERROR (or some condition like) so that when there is no start or end date is says "Not Started" for example.
I have tried this:
=IFERROR((DATEDIF(B2,TODAY(),"d")+1)/(DATEDIF(B2,C2,"d")+1),"Not start").
That problem that I've run into with this is I am trying to cap the percentage at 100%, and the code statement I started with does that. When I enter this string of code, it works, however when a project is complete it will say 150%, 450%, etc. I need it to also cap at 100%
assuming E15 is your start date and F15 is your finish date, try:
=IF(ISBLANK(E15),"Not start",IFERROR(MIN(1,(DATEDIF(E15,TODAY(),"d")+1)/(DATEDIF(E15,F15,"d")+1)),"Not start"))
This will display the progress as not started if there is no start date.
The =MIN(1,"other code") part is capping the value at 100% in the first example and it is missing from the second. try:
=IFERROR(MIN(1,(DATEDIF(B2,TODAY(),"d")+1)/(DATEDIF(B2,C2,"d")+1)),"Not start")
Related
I have a list of 42 tasks. I represent that those tasks are complete with a date (date completed). I want to calculate the percentage of tasks completed in row 45, but the percetage of tasks complete keep getting mixed up witht he dates. The date is just when the task was completed, and I want to know the percent of the tasks completed.
I haven't actually been able to figure out the code because the date is read. The date is irrelevant to the percentage of tasks completed, but it is needed for me to know WHEN it was done for annual training.
you can use the function COUNTA() to count the number of cells with values : put COUNTA(B1:B43), if the task with not dates have an empty cell. then to get the % you can do COUNTA(...)/42. hope it helped
Yes, you can use COUNTA(task column)/COUNTA(dates column) and also change the formatting of this cell into a number. It should work.
Formula - =COUNTA(B2:B11)/COUNTA(A2:A11)
enter image description here
Two sheets of info
I've 2 sheets of data(but pasted in one sheet itself), in that I'm trying to find Status of each Job for a particular date based on the server name. And my formulas are working without any issues until no duplicates on the same date.
If the job runs twice / thrice on the same day then my condition fails. Now I want to add one more condition to qualify the time range.
Here is my conditions..
If the time is before 5 PM and the latest job which is near to 5PM is success then it should capture success.
And any jobs that is failed before 5 PM is a failure. And if it has Failed, Success, Failed before 5PM then it is Failed (coz the latest is failed).
Here I'm using one more formula to convert Text to Date format but I'm not converting time from that Text. Any help would be appreciated. And I'm fine to add one more column for Time aswell.
I'm using 2 formulas here..
=INDEX(I2:I8,MATCH(1,(A2=L2:L8)*(C1=J2:J8),0)) #to find status
=DATE((MID((TEXT(LEFT(K2,10),"mm/dd/yyyy")), FIND("/", (TEXT(LEFT(K2,10),"mm/dd/yyyy")), FIND("/", (TEXT(LEFT(K2,10),"mm/dd/yyyy")))+1)+1,256)),LEFT((TEXT(LEFT(K2,10),"mm/dd/yyyy")),FIND("/",(TEXT(LEFT(K2,10),"mm/dd/yyyy")))-1),(SUBSTITUTE(MID(SUBSTITUTE("/"&(TEXT(LEFT(K2,10),"mm/dd/yyyy"))&REPT(" ",6),"/",REPT(",",255)),2*255,255),",","")))
#to convert text to date
You could try this using 2 helper columns:
Helper Column 1 (Date)
Here I extracted the date from the field "Date & Time" with the following formula:
=DATE(RIGHT(MID(L2;1;FIND(" ";L2)-1);4);LEFT(L2;FIND("/";L2)-1);MID(L2;FIND("/";L2)+1;FIND("/";L2;FIND("/";L2)+1)-FIND("/";L2)-1))
Helper Column 2 (Flag Time)
Here I put a value to determine if the time is before 5 p.m. and which is the closer time to this hour.
First we have to extract the time value, so I used to formula to do it:
--MID(L2,FIND(" ",L2)+1,LEN(L2))
In order to determine if the time is before 5 p.m. I used (giving a greater value if the time is after 5 p.m.):
IF(Time<=17/24,0,10)
Finally I get a value related to how closer is the time to 5 p.m.
(17/24-Time)
And the final formula is:
=IF(--MID(L2,FIND(" ",L2)+1,LEN(L2))<=17/24,0,10)+(17/24-(--MID(L2,FIND(" ",L2)+1,LEN(L2))))
With these values on the helper columns now we can achieve what you're looking for. I'm using this array formula (don't forget to press Ctrl+Shift+Enter in order to works correctly):
=IF(SUM(($M$2:$M$8=$A2)*($J$2:$J$8=B$1))=0,"",INDEX($I$2:$I$8,MAX(IF(MIN(IF(($M$2:$M$8=$A2)*($J$2:$J$8=B$1),$K$2:$K$8,""))=($M$2:$M$8=$A2)*($J$2:$J$8=B$1)*$K$2:$K$8,ROW($I$2:$I$8)-1,""))))
And this is the result that we got:
You cand find an example here. (you have to download as an excel file to test it)
I'm trying to highlight the time based on the folowing rules
If the time is lower than 7:30 be closer to red
Otherwise if the time is closer to 8:05 get close to green
In this sheet:
I guess it's easier to explain with the following illustration:
You should get the basic idea of what I'm trying to accomplish with the formulars in the formatting rule picture. That one however doesn't work.
Any ideas what would be the proper way to format this rule?
On the left side for value write 0,31 and on the right side write 0,34.
To get the correct value, that is corresponding to the correct time, simply select the time in Excel, using the Time() formula, press Ctrl+1 and select Number. You will see the correct number for the time.
Also found a way, albeit this is more of a workaround:
You can enter the values as a raw number in format of AB:CD:EF (or depending on the time format you are using) and excel will automatically format the rule somehow with decimal signs, although this really is more of a workaround rather than answer to the actual question
You can use "industrial minutes", minutes to a base of 100 industrialseconds. Then you can use standard decimal values.
In excel you simple multiply time values by 24 to get to that. Then 30 minutes are 0.5 of an hour.
For the conditional formating use a 3-Color scale and set the middlepoint to number 7.5 and a lighter green.
Here's my setup: I'm making a log for a time event I'm doing (think of it like sprinting), with a cumulative time broken up into segmented times, formatted as [hh:mm:ss.000] time values.
What I want to do is figure out how much time of a segment is of the cumulative time in the form of a percentage.
What I'm looking to do is basically do A6(segment)/A10(cumulative time)*100, however that formula obviously doesn't work.
If stop watch times (start at 0 in A1) then try in B2 copied down to suit and formatted as Percentage:
=(A2-A1)/A$10
I'm doing a report which calculates people's time to determine their pay. We pull reports from our servers and paste them into Excel to do the calculations. I have run into an issue when pulling the data: if the time they logged in for was less than an hour our formula is not working:
=IF(E159="","",((HOUR(E159)+(MINUTE(E159)+(SECOND(E159)/60))/60)))
This gives an error (#value) if the time is :34:15, but if it's 00:34:15 then it's fine.
Formatting the cell does not appear to work.
I'd like to go through this column and add the 00 to all values missing it, and I need some help or guidance from there.
Another question on SO looks like it may help, but I'm unsure on how to use it.
Assuming that The tiem is in cell E159 from your above formula, you can append a 0 to the start of the time. This will fix all the times that have the hour missing and won't affect the other lines.
="0"&E159
You can then replace all of the E159 references in your original formula with this edit so that it looks like this:
=IF(E159="","",((HOUR("0"&E159)+(MINUTE("0"&E159)+(SECOND("0"&E159)/60))/60)))
While it's hard to read, it does the trick.
While that answers you question.. I think that there is a better way to achieve this formula.
It looks like the end result you're looking for is the time converted to hours, with mulutes and seconds as a decimel to the next hour. You can achieve this by doing:
=E159*24
Which will give you the same result as your original formula.
And then to combine that with my first answer to get a formula that looks like:
=("0" & E159)*24
This approach is much easier to read / edit and provides the same output.
Why This Works
Excel stores all dates as whole numbers, and all times as a decimel % to a day.
So when Excel is stores 12 hours it saves it as .5 because it is half of a day.
By dividing the time output by 24 we are converting the entire time value down from a % of day to a % of hours.