# Variable plus or minus

#### MitchClarke

##### New Member
Is it possible to place a conditional plus or minus in an equation based on a cell.
Example, lets say cell A1 has a drop down menu with three possible options, "plus", "minus", " " (blank, or none).
If Cell A2 is solving my solution, its going to look something like this:
A2 = Vlookup([data]) and then + or - or nothing depending on cell A1 followed by another Vlookup([data]).

So essentially the two values being returned by the vlookup formulas are either being added or subtracted or none dependant on cell A1.

What I do not want is an "if" statement to start the equation and then depending on cell A1, it would calculate what is being asked.
In the end, there will be multiple cells similar to A1 with multiple Vlookup equations in the solution cell and I need a variable equations to add the vlookup's together.

Does that make sense? And is this possible?

Thanks!

### Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
If not an if statement, what else are you thinking of? I'm pretty sure an if statement is going to be your only option here.

I'm Not sure I follow, but maybe something like this...

= Vlookup([data]) + (Vlookup([data])*IF(A1="+", 1, IF(A1="-",-1,0)))

It multiplies the 2nd VLOOKUP by 1 for plus, by -1 for minus, and by 0 for none.

That's perfect. Thank you.

Replies
9
Views
257
Replies
8
Views
2K
Replies
3
Views
191
Replies
7
Views
157
Replies
0
Views
627

1,219,570
Messages
6,149,045
Members
450,853
Latest member
xtiinctt

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

### Which adblocker are you using?

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

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