Excel adding production time and dividing by total profit - excel-formula

I am wanting to add how long each step of a job takes and divide that total by the job's profit to adjust my pricing.
I have cells A1:D1 formatted to hh:mm
I have tried:
| B | C | D | E |
|-----|-----|-----|-------------|
| :15 | :30 | :15 | =SUM(B1:D1) |
My result in E1: 0
I then tried:
| B | C | D | E |
|-----|----|-----|-------------|
| .25 | .5 | .25 | =SUM(B1:D1) |
My Result in E1: 0
- I did switch my format here to "general" for the cells B1:D1 and got the correct answer, but it drives me nuts I can't use time!?
I then thought - I do know how to subtract the difference between two times for a time sheet (how many hours did I work between 3:00 AM and 4:15 AM so I did that and got the correct answer: 1 hour in E1, and what I'm really in need of is how much I'm making per hour.
I then divide my profit in G1 by my result in E1: =G1/E1
enter image description here
And I'm getting $853.93 per hour. .... where am I going wrong on this?
My F & G columns are formatted as Accounting
Thanks in advance. What is it about Excel and time? If someone knows of a good tutorial on understanding how Excel sees time, that might help too. I've looked on SO and google. I read all the posts SO suggested when I entered my question title and went though several before posting my question.
Thanks again,
Alika

I can't comment yet (reputation below 50). However, I believe I have something valuable to add :)
If you want to calculate time in Excel learn about how it is represented in Excel (it is represented as a number): this article covers the subject.
Either you made a typo in your post or you have a circular reference:
my result in E1: =G1/E1
Learn about format: [h]:mm:ss

Related

Calculate sum of differences between rows but only if the previous cell is bigger than the current one

I started to get a headache around my problem that I cannot figure out for the love of me.
There are unknown amounts of column if that makes any difference, but basically each row needs to be compared to the previous one and ONLY when the previous value is greater, the difference between them gets added to the sum.
So for example I have this table
| A |
--|-----|
1 | 100 |
2 | 90 |
3 | 80 |
4 | 100 |
5 | 70 |
6 | 20 |
7 | 100 |
...
Expected result: 100, derived from ((100-90) + (90-80) + (100-70) + (70-20))
I have spent a whole day browsing every single excel tutorial page and cannot find a single helpful answer. Please help :(
Formula for Cell B2: (pull down through the rows).
=IF(A1>B1;A1-B1;0)+B1
Logic: If previous value is larger than current value, add the difference to the total.
If you want to do it in one formula, a basic way would be two use two ranges offset by one cell:
=SUMPRODUCT((A1:A6-A2:A7)*(A1:A6>A2:A7))
If you wanted to make a bit more dynamic (assuming there are no gaps in the data) you could try
=SUMPRODUCT((A1:INDEX(A:A,COUNT(A:A)-1)-A2:INDEX(A:A,COUNT(A:A)))*(A1:INDEX(A:A,COUNT(A:A)-1)>A2:INDEX(A:A,COUNT(A:A))))
If there are blanks between numbers, this won't work and you would probably need to go back to a simpler pull-down formula

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)

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).

Calculating part time and full time employees

I have three columns in Excel 2010:
Name
Activity
Person_Days
a pattern looks like this:
John | Activity_A | 2
John | Activity_B | 10
John | Activity_C | 5
Mary | Activity_A | 2
Mary | Activity_D | 12
...
I want to make an extra column that tells me if a person is working 1-30% of the time, 30-60% of the time or 60-100% of the time. Maximum number of person days is 18.
How can I make a formula in Excel which calcultes that?
How about try the SUMIF formula?
=SUMIF(A1:A5, "John", C1:C5)
The above would check cells in A1 to A5 for the value "John" and sum the contents of C1 to C5 where the A column value is "John".
Take that and work out your percentage using your 18 person days. Then just throw in some conditional formatting to show colours for your percentage breaks.
Above would need tweaked to give you exactly what you want but the core idea should work.
SF

Excel VLOOKUP Date Range Split

Thanks in advance for your time and consideration.
I am familiar with the concept of the VLOOKUP function in excel and was hoping for a little assistance. I have multiple tables in excel and have used the VLOOKUP command with success to do things such as fill cells with the full name, address, etc of an business when our internal business code is input. My current problem is this.
I have coverage tables indicating insurer X covers company Y over a given date range. I have data indicating company Y made Z dollars in earnings over another given date range. These dates most often do not match up nicely. I want to a sum of the total earnings associated with each insurer.
For example, Company Y was covered by Insurer A from 01/01/1980 to 04/15/1980 and Insurer B from 04/16/1980 until 06/20/1981. Company Y earned $250.00 from 01/01/1980 to 03/31/1980 therefore that $250.00 was covered by Insurer A, $0.00 by Insurer B as the date range doesn't include any time covered by Insurer B. Company Y earned $1000.00 from 04/01/1980 to 12/31/1980, No income the next year. 15 Days were covered by Insurer A, 260 days covered by Insurer B. Therefore $54.55 ((15/275)*1000) covered by Insurer A, $945.45 ((260/275)*1000) by Insurer B. Summed up $304.55 Insurer A, $945.45 Insurer B.
How would I go about doing this? If this is something beyond the features of excel, what would you recommend doing instead? Thank you so very much for your help, taking the time to answer questions here is appreciated.
It should be noted that my coverage tables are complete already. The data I have to input is the business, earnings period start and end dates, and total earnings in that period. The coverage tables include business, insurer, coverage period start and end dates. They are on different workbooks, but I am familiar how to reference external data on other workbooks.
Here is an example of the how the data is structured.
https://docs.google.com/spreadsheets/d/1nSotP9TYgyKeL0y_CeQXEwfs-ygaPW17LSMf9NOh6GY/edit?usp=sharing
Assuming that we have two tables: 1-INSURERS TABLE:
Insurers | Begins | Ends |
A |01/01/1980|04/15/1980|
B |04/16/1980|06/20/1981|
And 2-EARNGINGS TABLE:
#|Amount | Begins | Ends |
1| 250 |01/01/1980|03/31/1980|
2| 1000 |04/01/1980|12/31/1980|
Then we will add some extra auxiliary columns at the end of 2-table:
#|Amount | Begins | Ends | Days | A | B |
1| 250 |01/01/1980|03/31/1980|=[ends]-[begins]+1|[1-days for A]|[1-days for B]|
2| 1000 |04/01/1980|12/31/1980|=[ends]-[begins]+1|[2-days for A]|[2-days for B]|
Put this Formula into [1-days for A] to calculate days for companies and fill down from [1-days for A] to [2-days for B] using mouse :
=IF(MIN(VLOOKUP(L$3,$B$4:$D$6,3,FALSE),$J4)-MAX(VLOOKUP(L$3,$B$4:$D$6,2,FALSE),$I4)+1>0,MIN(VLOOKUP(L$3,$B$4:$D$6,3,FALSE),$J4)-MAX(VLOOKUP(L$3,$B$4:$D$6,2,FALSE),$I4)+1,0)
To get result, we should create 3-table "RESULT TABLE":
#| A | B |
1|[1-amount belongs to A]|[1-amount belongs to B]|
2|[2-amount belongs to A]|[2-amount belongs to B]|
Put this formula into [1-amount belongs to A] to calculate companies' portion and fill using mouse:
=HLOOKUP(C$16,$G$3:$N$6,MATCH($B17,$G$3:$G$6,0),FALSE)/VLOOKUP($B17,$G$3:$N$6,5,FALSE)*VLOOKUP($B17,$G$3:$N$6,2,FALSE)
It's a bit complicated, to understand, use my example file as well.
I hope I understand your problem.
The following is from your example. You can do it with the help of sumproduct.
Left side is your insurer table. Right side is the claim table.
The below is the formula you can use. As mentioned earlier. it is bit complex and works well.
=IFERROR(SUMPRODUCT(1*($G$2:$G$5>=C2)*($H$2:$H$5<=D2)*$I$2:$I$5),0)+IFERROR(SUMPRODUCT(1*($G$2:$G$5<C2)*($H$2:$H$5>D2)*(D2-C2+1)/($H$2:$H$5-$G$2:$G$5+1)*($I$2:$I$5)),0)+IFERROR(SUMPRODUCT(1*($G$2:$G$5>=C2)*($G$2:$G$5<=D2)*($H$2:$H$5>D2)*(D2-$G$2:$G$5+1)/($H$2:$H$5-$G$2:$G$5+1)*($I$2:$I$5)),0)+IFERROR(SUMPRODUCT(1*($H$2:$H$5<=D2)*($H$2:$H$5>=C2)*($G$2:$G$5<C2)*($H$2:$H$5-C2+1)/($H$2:$H$5-$G$2:$G$5+1)*($I$2:$I$5)),0)
For Sample Excel Click Here

Resources