Forum Discussion

Heidi1275's avatar
Heidi1275
Copper Contributor
Dec 19, 2023

variables with two different outcomes

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:

  • 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.

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    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.

    • Heidi1275's avatar
      Heidi1275
      Copper Contributor
      Many thanks for your help with this - it works perfectly.

Resources