Excel - Multiple Variables, Multiple Returns

[Closed]
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hi,

I've been driving myself crazy on excel trying to figure out a formula to calculate the responses for a test. Here's what I need it to do:

If the value in cell A2 matches the value in cell B2, I need it to display a 1.
If the value in cell A2 does NOT match the value in cell B2 and is not blank, I need it to subtract .25 or display -.25 (whichever).
If there is no value in cell A2 (if it's blank), I need it to display 0.

I can't find this anywhere because nothing explains how to pick between 3 inputs and then return one of 3 values.

Hope you can help.>

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
That will be hard to do cause it is cyclic
you seem to be saying that if A2 is same as B2, then make A2 =1