excel - calculate date based on number of hours / planner - excel

I'm trying to figure out how to auto generate/populate a column in excel based on the number of hours filled in another column:
Start date: 04-08-2011
Hours in one day: 8
Issues Hours Date
part 1 | 2 | 04-08-2011
part 2 | 6 | 04-08-2011
part 3 | 2 | 05-08-2011
part 4 | 2 | 05-08-2011
part 5 | 8 | 06-08-2011
part 6 | 2 | 06-08-2011
So when i add issue 'part 1' the date starts # the start date, when i add hours or 'parts' it continues to use the start days until it reaches 8 hours and continues to the next day.
Also when im adding a row between the existing rows it automatically recalculates the dates.
Anny ideas where to start? Tnx

If I understand what you are asking correctly, and assuming start date is in Cell B1, and hours in 1 day B2
And data header in A4:C4, with data below
Then put the formula '=$B$1+INT(SUM($B$5:B5)/$B$2-0.1)' in C5
Copy C5 down and it should generate the date automatically
The '-0.1' is to account for exactly 8 hrs being allowed in 1 day

Related

Formula for Data Comparison

I am looking for a formula that will populate a cell based on yesterday's day value for last month.
Please see my example:
Prior Month Comparison | | |
5-Jul | 5-Aug |4-Aug | 5-Jul
Total Number of Records: 10 | 25 | 7 | 10
Total Records Sold: 5 | 3 | 0 |... 5
I have all of July records to the right of my August records. I might have to use arrays so I'm not sure what would be the best approach.
I have looked into index/match but I'm not sure how to best apply this formula. I am available to any formula that will help me fill out my Prior Month Comparison column.
Thanks!!
Use HLOOKUP:
=HLOOKUP($B$1,C:E,ROW(),FALSE)

IF value in list, perform VLOOKUP and add result

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.

Excel - Rather complex SUM IF criteria

I have roughly the following setup:
Values:
MONTH | DURATION | VALUE |
5 | 3 | 120 |
6 | 1 | 100 |
Expected outcome for totals:
MONTH | TOTAL
5 | 120
6 | 220
7 | 120
What I would like to do, is to be able to sum in another table the total values for each month. The logic would be to SUM every value where the total table's month is equal or higher than that of the values, but lower than the value's month + duration.
Does that make any sense? Is that possible? I'm cracking my head and I can't seem to find a way to solve it.
Thank you very much.
The easiest solution is probably to make another column with the end month. And then use SUMIFS to check if month is >= starting month and <= ending month.
=SUMIFS(<Range of Values>,<Range of starting>,"<="& "Target month",<Range of ending>,">="& <Target month>)
DSUM is the best candidate for this, I believe. See Microsft's documentation and this site for help understanding function, and what it is doing. I have made very complex calculations possible in Excel by using the "database" methods (DSUM, DCOUNT, etc).

How can I put together a SUMIFS in Excel to include an OR?

I'm trying to put together a calendar of regular payments which will have a date begun, day the money is paid and the date cancelled (if there is one), however I'm struggling with setting up my SUMIFS function. I've set up an example here.
What I'm trying to do is add the paid value on the day the payment is made, if the date started is less than the date, and only if the date cancelled is empty or the date is before the date cancelled.
List of payments:
A B C
1 Payment | Begun | Cancelled
---------+------------+------------
2 £5.00 | 01/01/2016 |
3 £9.00 | 04/01/2016 | 01/02/2016
Calendar (that I'd expect):
E F
1 Date | Payment
----------+---------
2 01/01/16 | £5.00
3 02/01/16 | £0.00
4 03/01/16 | £0.00
5 04/01/16 | £9.00
...
33 01/02/16 | £5.00
34 02/02/16 | £0.00
35 03/02/16 | £0.00
36 04/02/16 | £0.00
So in this example: £5 should be added on 01/01/16 and 01/02/16, while £9 should be added on 04/01/16 only.
So far in the F column I have:
=SUMIFS($A$2:$A$3, DAY($B$2:$B$3), "="&DAY(E2), $B$2:$B$3, "<="&E2, $C$2:$C$3, ">="&E2)
This Array formula in F2 should do what you want:
=SUM(IF((DAY($B$2:$B$3)=DAY(E2))*(E2>=$B$2:$B$3)*(E2<=$C$2:$C$3),$A$2:$A$3))+SUM(IF((DAY($B$2:$B$3)=DAY(E2))*(E2>=$B$2:$B$3)*(""=$C$2:$C$3),$A$2:$A$3))
It is an Array formula and must be confirmed with Ctrl-Shift-Enter. Then copied down.
The 'OR' in Array formulas must use a +. If all you had were AND the * would work.
I assume you are going to be adding dates to columns A:C, you can change all the small absolute ranges to the desired ranges and it will work for multiples.
Do forgive our backwards dates.
you should just ADD the results of two separate SUMIF()'s in your case:
=SUMIFS($A$2:$A$3, DAY(B$2:B$3), "="&DAY(E2), $B$2:$B$3, "<="&E2, $C$2:$C$3,">="&E2)
+
SUMIFS($A$2:$A$3, DAY(B$2:B$3), "="&DAY(E2), $B$2:$B$3, "<="&E2, ISBLANK($C$2:$C$3),TRUE)
Confirm with Ctrl+Shift+enter

Excel function for indexing and matching multiple criteria

Say I have the following column headings filled with data on Sheet2:
| Station number | Year | Month| Rainfall (mm) |
XX1 1995 1 30
XX1 2005 4 50
XX1 2004 5 70
...
And the following columns on Sheet1:
|Year | Month of Max | mm | Month of Min | mm |
2004
2005
2006
...
I have the following code under the "Month of Max" column:
=INDEX(Sheet2!B2:B10000,MATCH(MAX(Sheet2!D2:D10000),Sheet2!D2:D10000,0))
However, I want to match the years too (i.e. the year in Sheet1!A2 should match the year in Sheet2!B2:B10000 for looking up the maximum rainfall). I can't figure out where to put this function and keep getting errors. Sorry if this is obvious or has been asked before, I'm just very stuck!
MATCH is not suited to matching multiple creiteria. An alternative is this
=MAX(IF(Sheet2!$B$2:$B$10000=Sheet1!A2,Sheet2!$D$2:$D$10000,""))
enter as an Array Formula (press Ctrl-Shift-Enter rather than just Enter)
The IF part returns an array, with entries for non-matching years set to a null String. MAX then gets the maximum value of that array

Resources