Jump to content

I'm trying to automate working out my weekly wages and i need to a wierd formula because of the way my company pays wages, basically if i work 6 hours they add 0.1 to that shift so i'm trying to add 0.1 if cell is greater than 6 i also need to take off 30 mins for break time so this is the formula i thought would work

=D4-0.5&IF(D4<6+0.1,D5)

D4 is hours worked

D5 is the output payable hours

the return i get is 7.5FALSE

Link to comment
https://linustechtips.com/topic/647234-need-help-in-excel-formula/
Share on other sites

Link to post
Share on other sites

17 minutes ago, brandon9990 said:

I'm trying to automate working out my weekly wages and i need to a wierd formula because of the way my company pays wages, basically if i work 6 hours they add 0.1 to that shift so i'm trying to add 0.1 if cell is greater than 6 i also need to take off 30 mins for break time so this is the formula i thought would work

=D4-0.5&IF(D4<6+0.1,D5)

D4 is hours worked

D5 is the output payable hours

the return i get is 7.5FALSE

i haven't done excel in a while, but i believe its because you are omitting the value if false part of the if statement. you are saying that if d4<6+.1 is true, then d5, but you arent specifying what to do if it isnt true.

******If you paste in text into your post, please click the "remove formatting" button for night theme users.******

CPU- Intel 6700k OC to 4.69 Ghz GPU- NVidia Geforce GTX 970 (MSI) RAM- 16gb DDR4 2400 SSD-2x500gb samsung 850 EVO(SATA) Raid 0 HDD- 2tb Seagate Case- H440 Red w/ custom lighting Motherboard - MSI Z170 Gaming A OS- Windows 10 Mouse- Razer Naga Epic Chroma, Final Mouse 2016 turney proKeyboard- Corsair k70 Cherry MX brown

Link to post
Share on other sites

and if you are still interested to stop it from taking away the lunch break if i don't work that day i tweaked the formula to this =IF(D4>=6,D4+0.1-0.5,IF(D4=0,,D4-0.5))

so if hours worked is greater than 6 add 0.1 and take 0.5 but if it is less then 6 is it equal to 0 and if it is do nothing but if it isn't deduct 0.5

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×