Formula based on choice

RandyD123

Active Member
Joined
Dec 4, 2013
Messages
289
Office Version
  1. 2016
Platform
  1. Windows
I have this in a cell:

=IF(Y16<>"Y",0,Z16-H16

MY default is "N" and if I don't change the Y/N cell to Y I want the formula to just subtract Z16-H16

N is in all the cells in the Y/N column by default.

How do I write the formula to just minus H16 from Z16 as a default and still have the formula work if I select "Y"?

I'm not sure if I need to provide more info or not?
 
Last edited:

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Just copy and paste the formula from this thread. Maybe you left the " " out from around the "N"?
 
Upvote 0
I'm not sure why my original formula is not doing what is supposed to do and that is minus Z16 from H16 if Y is a N
 
Upvote 0
Perhaps I misunderstand. What is supposed to happen for each of the two options?

Y = ?
N = ?
 
Upvote 0
Y means I'm turning something on
N means I'm turning something off.
 
Upvote 0
jbeaucaire....thanks for taking time to help. The more I look at the formula, it works as intended. As it turns out I just needed the Z16-H16!!! At least that's what I'm thinking at this point. I am going to try this for a few days and see if I'm all set.
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top