Copilot for Microsoft 365 Tech Accelerator
Feb 28 2024 07:00 AM - Feb 29 2024 10:30 AM (PST)
Microsoft Tech Community
SOLVED

variables with two different outcomes

Copper Contributor

Hi

First time posting :)  with limited knowledge of formulas

 

I'm trying to create a sheet where if cell E7 contains "Y" then price net of 20% Tax will be calculated using Cell F7 but appear in G7 (F7/1.2)  However,  if E7 contains "N", then cell G7 will equal F7. 

 

Is this possible?

Thanks :smile:

2 Replies
best response confirmed by Heidi1275 (Copper Contributor)
Solution

@Heidi1275 

You can achieve this in Excel by using a simple formula with an IF statement. Assuming your data is in cells E7 and F7, and you want the result in G7, you can use the following formula in G7:

=IF(E7="Y", F7/1.2, F7)

Here is how this formula works:

  • If the value in E7 is "Y", then it calculates F7 divided by 1.2 (net of 20% tax).
  • If the value in E7 is not "Y" (meaning it's "N" or any other value), then it simply returns the value in F7.

This way, the outcome in G7 will be different based on the value in E7. If E7 is "Y", it calculates the net price; if E7 is not "Y", it simply returns the original value in F7.

You can adjust the formula based on your specific requirements, and you can copy this formula to other cells if needed.

 

My answers are voluntary and without guarantee!

 

Hope this will help you.

 

Was the answer useful? Mark as best response and like it!

This will help all forum participants.

Many thanks for your help with this - it works perfectly.
1 best response

Accepted Solutions
best response confirmed by Heidi1275 (Copper Contributor)
Solution

@Heidi1275 

You can achieve this in Excel by using a simple formula with an IF statement. Assuming your data is in cells E7 and F7, and you want the result in G7, you can use the following formula in G7:

=IF(E7="Y", F7/1.2, F7)

Here is how this formula works:

  • If the value in E7 is "Y", then it calculates F7 divided by 1.2 (net of 20% tax).
  • If the value in E7 is not "Y" (meaning it's "N" or any other value), then it simply returns the value in F7.

This way, the outcome in G7 will be different based on the value in E7. If E7 is "Y", it calculates the net price; if E7 is not "Y", it simply returns the original value in F7.

You can adjust the formula based on your specific requirements, and you can copy this formula to other cells if needed.

 

My answers are voluntary and without guarantee!

 

Hope this will help you.

 

Was the answer useful? Mark as best response and like it!

This will help all forum participants.

View solution in original post