Skip to main content
Solved

Need help on automatically calculation

  • June 22, 2020
  • 1 reply
  • 12 views

Is there a way that we can automatically calculating based on different conditions

For example

IF
Service: Deep tissue massage
Time: 60 minutes

Result: Commission: 80

IF
Service: Deep tissue massage
Time: 90 minutes

Result: Commission: 150

IF
Service: Pain Relief massage
Time: 90 minutes

Result: Commission: 140

Thank you so much :pray:

Best answer by Jason11

Hi Jack,

You can accomplish that with a nested IF statement like this:

IF(
   AND(
      Service="Deep tissue massage", 
      Time="60 minutes"
   ),
"Commission: 80",

IF(
   AND(
      Service="Deep tissue massage", 
      Time="90 minutes"
   ),
"Commission: 150",      

IF(
   AND(
      Service="Pain relief massage", 
      Time="90 minutes"
   ),
"Commission: 140"
)
)
)

You can keep adding on conditions as needed - just make sure that you add commas at the end of all but the last condition (e.g. after “Commission” XXX), and add closing parentheses for however many conditions you have (e.g. 3 in the example above).

1 reply

Forum|alt.badge.img+20
  • Inspiring
  • Answer
  • June 22, 2020

Hi Jack,

You can accomplish that with a nested IF statement like this:

IF(
   AND(
      Service="Deep tissue massage", 
      Time="60 minutes"
   ),
"Commission: 80",

IF(
   AND(
      Service="Deep tissue massage", 
      Time="90 minutes"
   ),
"Commission: 150",      

IF(
   AND(
      Service="Pain relief massage", 
      Time="90 minutes"
   ),
"Commission: 140"
)
)
)

You can keep adding on conditions as needed - just make sure that you add commas at the end of all but the last condition (e.g. after “Commission” XXX), and add closing parentheses for however many conditions you have (e.g. 3 in the example above).