Skip to main content
Solved

How to modify only one specific part of the formula IF - example below

  • August 24, 2023
  • 2 replies
  • 30 views

Forum|alt.badge.img+3

Ok so here's the main formula I'm trying to use for my "Monday Pay Hours" field

IF({Monday Start} = BLANK(), 0,DATETIME_DIFF({Monday End}, {Monday Start}, 'minutes'))/60-0.5
This gives me the exact hours worked, minus a half hour lunch break
 
It's almost perfect, but what I need is to tell it that - IF the formula all the way up to here:
 IF({Monday Start} = BLANK(), 0,DATETIME_DIFF({Monday End}, {Monday Start}, 'minutes'))/60
equals less than 5, then don't add the last step of subtracting the 0.5. 
 
Is this possible?

Best answer by Sho

Oh, I still hadn't answered your previous question.

How about a formula like this?

IF( AND({Monday Start},{Monday End}), IF( DATETIME_DIFF({Monday End}, {Monday Start}, 'minutes')/60 >= 5, DATETIME_DIFF({Monday End}, {Monday Start}, 'minutes')/60 - 0.5, DATETIME_DIFF({Monday End}, {Monday Start}, 'minutes')/60 ), 0 )

 

2 replies

Forum|alt.badge.img+21
  • Inspiring
  • Answer
  • August 25, 2023

Oh, I still hadn't answered your previous question.

How about a formula like this?

IF( AND({Monday Start},{Monday End}), IF( DATETIME_DIFF({Monday End}, {Monday Start}, 'minutes')/60 >= 5, DATETIME_DIFF({Monday End}, {Monday Start}, 'minutes')/60 - 0.5, DATETIME_DIFF({Monday End}, {Monday Start}, 'minutes')/60 ), 0 )

 


Forum|alt.badge.img+3
  • Author
  • New Participant
  • August 25, 2023

Oh, I still hadn't answered your previous question.

How about a formula like this?

IF( AND({Monday Start},{Monday End}), IF( DATETIME_DIFF({Monday End}, {Monday Start}, 'minutes')/60 >= 5, DATETIME_DIFF({Monday End}, {Monday Start}, 'minutes')/60 - 0.5, DATETIME_DIFF({Monday End}, {Monday Start}, 'minutes')/60 ), 0 )

 


@Sho Thank you SO much!!! This worked like a charm! I don't entirely understand it, but it works!

I've been tearing my hair out trying to solve this one for days. Nailed it!