calculation time in schedule with IF

taken

Board Regular
Joined
Dec 14, 2012
Messages
55
Hey guys!

I'm quite new to Excel but I'm getting there I think.
I've got this example where I have my schedule at work for my employees. I got fed up calculating everything in my head so I started to create a schedule that makes it for me.

There's no problems to make an IF-statement for lets say Monday.
In this case i take two cells. I compare them and the result is the time in hours for that day.
The statement tells me if the person has been working more or less then five hours. If the person has been working more, then it takes 30 minutes of the result for lunch.

But, my problems comes when I need to set statements for each and everyday in the week.
How in the world can I tell every days times the same thing and still get the total hours worked per week, without a big FALSE.

I can send a file to anyone who can help me. Really need to sort this out.

Thank you!

// Martin
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Doesn't seem entirely to difficult, but I think we can better serve you if we had an example of what you want it to exactly look like. Thanks.
 
Upvote 0
Doesn't seem entirely to difficult, but I think we can better serve you if we had an example of what you want it to exactly look like. Thanks.

Absolutely.. Is there any way to upload files here or should I use my own server? :)
 
Upvote 0
Absolutely.. Is there any way to upload files here or should I use my own server? :)
You can't upload files to this site.

If you have your own server then you can put the file on it and post a link to the file.
 
Upvote 0
The problem is solved after some trial and errors.
I just made a calculation of the time underneath each day then added all these together for a result with if-statements.
Then I just hid the row so it's not visible anymore. =)
 
Upvote 0
The problem is solved after some trial and errors.
I just made a calculation of the time underneath each day then added all these together for a result with if-statements.
Then I just hid the row so it's not visible anymore. =)
I looked at your file...

You do need a separate cell for this calculation.

I used this formula:

B4 = Emma
C4 = 9;15
D4 = 20:15

=D4-C4-((D4-C4>=5/24)*30/1440)

Format as h:mm

Then you can just use a SUM(...) function on these results.
 
Upvote 0
yeah .. i did just like that.
So, you can download http://www.martinhult.se/schema_mall2013.xlsx
There's an update of what I've done so far.

My problem right now comes to macro.
I want to be able to make a row when clicking one of the buttons at the top.
I can get the row. But, I just don't get it working properly.
Also .. is there any kind of toggle funktion so I can toggle hide and unhide specific rows?
I want the user to be able to hide or unhide the hour-cells underneath the times.
 
Upvote 0
yeah .. i did just like that.
So, you can download http://www.martinhult.se/schema_mall2013.xlsx
There's an update of what I've done so far.

My problem right now comes to macro.
I want to be able to make a row when clicking one of the buttons at the top.
I can get the row. But, I just don't get it working properly.
Also .. is there any kind of toggle funktion so I can toggle hide and unhide specific rows?
I want the user to be able to hide or unhide the hour-cells underneath the times.

Also .. will the created row from the macro also effect it with the same settings as the other ones?
 
Upvote 0
yeah .. i did just like that.
So, you can download http://www.martinhult.se/schema_mall2013.xlsx
There's an update of what I've done so far.

My problem right now comes to macro.
I want to be able to make a row when clicking one of the buttons at the top.
I can get the row. But, I just don't get it working properly.
Also .. is there any kind of toggle funktion so I can toggle hide and unhide specific rows?
I want the user to be able to hide or unhide the hour-cells underneath the times.
Unfortunately, I'm not much of a programmer so someone else will need to help you with that.

If you don't get any more replies in this thread (after a reasonable amount of time) then start a new thread and make sure you put macro or VBA in the thread subject line.
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top