Excel experts of the world, unite!

abbor

GT Driver
Vintage Podium Finish
Joined
May 19, 2004
Messages
1,068
Points
55
Location
Trondheim, Norway
Okay, here's the situation...

At my work, we have this salary arrangement..

All days from Monday to Friday, I have 103,98 NOK before 18:00.
Between 18:00 and 21:00 I get 124,98 NOK.
Between 21:00 and 23:15 I get 144,99 NOK.

So I put together this Excel-doc to find out what I'm gonna earn:

http://home.no.net/redheadn/JW/Bok2.xls

The problem is that I'm not a very good programmer, this is the first time I ever used the IF-function in Excel.

I want to type in C and D when I have worked from and to, and then let Excel fill in the correct times under the different wages.

It works every time I fill in a time where I've worked within all the wages, but as soon there's one exception(See line 5), everything fucks up because of my code..

Can anyone please tell me what functions I should use instead of those I've used?
 
Computers suck. Grab a pencil a peice of paper and a calculator. :wink:
 
Here's a possible solution for you:

Set up 3 columns, one for each salary range... they will be used to store # of hours.

Let's say 3 the columns are E, F and G.

In column E, put down the formula (without quotes): "=MAX(0,MIN(D3,(1800/2400))-C3)"

In column F, put down the formula: "=MAX(0,MIN(D3,(2100/2400))-MAX(C3, (1800/2400)))"

In column G, put down the formula: "=MAX(0,MIN(D3,(2325/2400))-MAX(C3, (2100/2400)))"

You just have to multiple them with the corresponding rate to get the total salary for the day. Hope this works... if not, dont chase after me for your missing salary :mrgreen:
 
I made it... :D But I used a lot more advanced way than you alien... I used something like a trillion IFs, so I'm very, very confused right now, but I think I made it...
 
that's just another way of writing if statements

what you want is a loop, or a recursive solution :P
 

Trending content

Members online

No members online now.

Forum statistics

Threads
43,976
Messages
559,712
Members
18,323
Latest member
Hinsu2
Back
Top