Hi I was wondering how I can calculate the number of days difference based on todays date. I would like to create a table like the following:
>50 >40 >30
Agent A
Agent B
based on this data:
Agent | Work Completed
A | 12/07/2017
B | 01/03/2017
A | 12/06/2017
Result should be:
>50 >40 >30
Agent A 0 1 0
Agent B 1 0 0
I have tried a sumif and sumproduct but as I have a field with todays date (=today()) and then I am minusing the 2, this doesn't work.
Would really appreciate some advice.
Here's an example
It caters for future dates, things within 30, 60, 90, or more days old.
Data creates random list of dates relative to today.
Forumulae
Related
I have a list of employees, a column stating their 'available days multiplier' (eg a full time employee would be 1.0, a part time employee working 4 days out of 5 would be 0.91, 3 days would be 0.80 and so on. The next column calculates the employees available holidays, based on a standard 30 days multiplied by the 'available days multiplier'. See below, with an example formula in brackets :
A B C
1 Name | Available Days Multiplier | Holidays
2 Employee A | 1 | 30 (=30*B2)
3 Employee B | 0.91 | 27
4 Employee C | 0.91 | 27
5 Employee D | 1 | 30
Employees have an option to purchase additional holidays, which I have stored in a separate table containing 'Name' and 'Days'
S T
1 Name | Purchased Days
2 Employee 2 | 5
3 Employee 4 | 3
I would like to amend the formula in column C to not only calculate the holidays based on available days multiplier, but also to look up the list in columns S:T and add on any purchased days, if the employee name is found.
I suspect this could be quite easy with an IF/VLOOKUP combination, but I cannot find the correct syntax. Any help greatly appreciated.
If I have understood correctly, you could use SUMIFS:
=(30*$B2)+SUMIFS($T$2:$T$3,$S$2:$S$3,$A2)
This works by first calculating the number of holidays as you have been doing and then adding any purchased ones.
If the employees name appears more than once in the list, it will add the total sum of purchased holidays to the total.
SUMIFS sums the first range (T2:T3) if the second range (S2:S3) matches the criteria (A2).
Hope this helps. If you need further clarification, please let me know.
I have this file
Date | Time | Table | Checkin Time | Bill Number ..| .. |
7/1/2018 **18:03:48** **6** **18:03:48** **4332**
7/1/2018 18:11:23 **6** **18:03:48** **4332**
7/1/2018 18:23:10 **6** **18:03:48** **4332**
7/1/2018 19:24:11 8 19:24:11 4333
7/1/2018 19:56:17 8 19:24:11 4333
7/1/2018 20:31:11 *6 20:31:11 4332*
I need to calculate Checkin Time which is 1st time of table number and bill number.
For example See one customer checkin at 18:03:48 with table number 6
His Bill number is 4332 .
So for table number 6 and Bill number 4332 chekin time will be 1st time
which is 18:03:48.
So I applied the formula:
=IF(AND(E3=E2,C3=C2,A3=A2),D2,MIN(OFFSET(E3,0,-3,MATCH(0,(E3:E$35470=E3)*(C3:C$35470=C3)*(A3:A$35470=A3),0)-1,1)))
But the value changes at 6th row .
It's giving 20:31:11 as checkin time .
It should be 18:03:48 because the 6th row table number and bill number is same as 1st one.
So How do I make it possible, to calculate the checkin time as per 1st time who have same bill and table number , no matter which row .
Here is the excel file I have uploaded to Google drive.
Here is the screenshot.
Edit:- Formula by #jeeped work, But as the log is of 30 days
The data keeps repeating the other day too.
Can it be done by giving some unique date value ?
If you don't have the newer MINIFS and MAXIFS, use AGGREGATE to achieve the same result.
=AGGREGATE(15, 7, ((A$2:A$7)+(B$2:B$7))/((C$2:C$7=C2)*(E$2:E$7=E2)), 1)
Format the result any way you want; as date and time, time only, etc.
You can make use of an array formula combining INDEX+MATCH to return the earliest time value that matches your conditions first. In cell D2, enter the following:
=INDEX($B$2:$B$7,MATCH(1,($C$2:$C$7=C2)*($E$2:$E$7=E2),0))
When returning, be sure to press CONTROL+SHIFT+ENTER instead of just ENTER to make sure the formula calculates correctly.
#Jeeped's answer is spot on, here is an adjustment for the formula to work over multiple days that have the same table numbers and bill numbers:
=AGGREGATE(15, 7, ((A$2:A$13)+(B$2:B$13))/((C$2:C$13=C2)*(E$2:E$13=E2)*(A$2:A$13=A2)), 1)
All I did was add this extra conditional argument, that checks if the "Date" is the same:
*(A$2:A$13=A2)
I have successfully managed to calculate the number of days in a specific month between two dates. However I need to calculate those days as work days within the formula. For example.
| ------------- A -------------------- B --------------- C
| 1 ------- 11/12/2014 ----- 17/03/2015 ----- 01/03/2015
| 2
A - Being the start date
B - Being the End date
C - Being the month to check the number of days range A1:B1 falls within. (In this case March)
=MAX(0,MIN(EOMONTH(C$1,0),$B1)-MAX(C$1,$A1)+1)
This should produce 17, which is the number of regular days. How can I produce the number of working days, and incorporate
=NETWORKDAYS()
Ultimately the answer should be 12.
Thanks in advance for your suggestions.
How about this:
=NETWORKDAYS(MAX(A1,C1),MIN(B1,EOMONTH(C1,0)))
It might be wise to expand it with some error checking like so:
=IF(NETWORKDAYS(MAX(A1,C1),MIN(B1,EOMONTH(C1,0)))<0,0,NETWORKDAYS(MAX(A1,C1),MIN(B1,EOMONTH(C1,0))))
I've been looking all over for help with this, but not quite found what I'm looking for.
What I'm trying to do is add up the values of CREDIT (B2:B13) up to the current month and put that value in D2.
A B C D
1 DATE CREDIT TOTAL AS OF TODAY
2 15/01/2015 1000 4000
3 15/02/2015 1000
4 15/03/2015 1000
5 15/04/2015 1000
6 15/05/2015 1000
7 15/06/2015 1000
8 15/07/2015 1000
9 15/08/2015 1000
10 15/09/2015 1000
11 15/10/2015 1000
12 15/11/2015 1000
13 15/12/2015 1000
For example: Lets say the current date is 30th April 2015. Sum all the values in B2:B13 up to today's date based on their date value from the Date column (A2:A13). So D2 should = 4000.
I'm quite new to Excel so please forgive me if this is a stupid question.
Thanks very much in advance for any help.
SUMIF should do the trick (documentation here)
So D2's formula would be:
=SUMIF($A2:$A13,"<"&Today(),$B$2:$B$13)
The first argument is the range you want to test. The second argument is the condition you want to test for. The last argument is the range that you want to add up if the test passes.
I'm working on an excel sheet which has a simple structure like this.
Date | Order
-----------------------
08-15-2014 | 84
08-16-2014 | 50
08-17-2014 | 68
08-17-2014 | 78
08-18-2014 | 23
Here, in a separate column I'd like to calculate the sum of Orders by week days(Sunday, Monday and so on). Meaning, I want to see how many Orders received on Sunday, Monday etc.
So far I have come up with this non working formula.
=SUM(LOOKUP(1, WEEKDAY(date_column), order_column))
This was example for summing all order received on Sunday. And, yes Date column is in DateTime Data type so that shouldn't be a problem.
Thanks.
Consider adding a new column after the dates, representing the day values. So in column B you might have something like =TEXT(WEEKDAY(A2),"ddd").
Then if you wanted to sum up order numbers by day, you could use an equation like =SUMIF(B1:B5,"Sun",C1:C5) where column B has the day values and column C has the order numbers.
To show an example (with headers, etc):