Add a plus (+) or minus (-) sign to a duration field based on a selection

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

Hi all,

I have a form where users select if they performed over-hours or minus-hours and a duration field. 

In this field they only select the duration, for example 02:00 (hours).

To calculate the total balance i would like to create an "actual duration" field, where the plus or minus sign will be added based on the selection of the user. 

I tried with an IF formula but I can't get it working... 

IF([Request Type]="Minus Hours", -[Duration], [Duration]) 

Can you please help? 

Photo of Spyros

Spyros

  • 32 Points

Posted 3 years ago

  • 0
  • 1
Try this

IF([Request Type]="Minus Hours", -1 * [Duration], [Duration])
Photo of Spyros

Spyros

  • 32 Points
Perfect! Thank you very much!!