Help on a formula
Hi there,
I try to convert hours to duration, on a basis : 7 hours = 1 day.
I made a formula that has been working so far. But my boss asked me to add a minute setting. So that's my formula :
= IF(AND(Heures@row = "0,5"); 0,05;
IF(AND(Heures@row = "1"); 0,1;
IF(AND(Heures@row = "1,5"); 0,2;
IF(AND(Heures@row = "2"); 0,3;
IF(AND(Heures@row = "2,5"); 0,35;
IF(AND(Heures@row = "3"); 0,4;
IF(AND(Heures@row = "3,5"); 0,5;
IF(AND(Heures@row = "4"); 0,6;
IF(AND(Heures@row = "4,5"); 0,65;
IF(AND(Heures@row = "5"); 0,7;
IF(AND(Heures@row = "5,5"); 0,8;
IF(AND(Heures@row = "6"); 0,9;
IF(AND(Heures@row = "6,5"); 0,95;
IF(AND(Heures@row = "7"); 1))))))))))))))
So it works for whole numbers, but nothing is dispolayed if I select a decimal number.
Have you an idea ?
Thanks a lot for your help.
Comments

So you are wanting to figure out what percentage of 7 hours (for example) 3 hours and 52 minutes is?

Hello thanks for comment.
I would like only to convert hours and half an hour.
So for instance if someone works : 2H30,
 I would have 2,5 in my column "hours"
 It would represent 0,3 in my column duration for one day.
I don't know if I'm clear
Thanks for help

Ok. I am beginning to understand.
So 2H30 would equal 2,5 hours. 4H30 would equal 4,5 hours. So on and so forth.
How would 2 hours be displayed?
2H?
2H00?
2?

2 hours is displayed 2
My formula works when it returns a whole number. So it works with 2.
But nothing appears when it returns a decimal number. So it doesn't work with 2,5.
You can see it in my screenshots. Yet, I used the same exactly the same code.

Have you tried removing the quotes from around the numbers?

Great it works ! It was so simple in fact
Thank you so much for your help. Have a nice day.

Categories
 All Categories
 14 Welcome to the Community
 10.9K Get Help
 65 Global Discussions
 69 Industry Talk
 385 Announcements
 3.6K Ideas & Feature Requests
 56 Brandfolder
 125 Just for fun
 50 Community Job Board
 464 Show & Tell
 40 Member Spotlight
 44 Power Your Process
 28 Sponsor X
 234 Events
 7.3K Forum Archives