Multiply by 3 if cell is "2" or "3" but not 1.

oneyearsixmonths

New Member
Joined
Nov 16, 2015
Messages
8
This seems like it should be simple..

All i want to do is if i put in 1 into a cell, that the result stays as 1
But if i put in 2 or 3 in a cell, the result is multiplied by 3.

Thanks
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi and welcome to the Forum.

If you want to modify the value entered (in its position) then you need to use event driven VBA code.

An easier way to do this is to leave the value as entered then have another column (possibly hidden) that holds the multiplier.

For example if A1 holds your value, in B1 put the formula

Code:
B1: =IF(OR(A1=2, A1=3),3,1)

and you point to this multiplier from other referenced cells.
 
Upvote 0
Hi and welcome to the Forum.

If you want to modify the value entered (in its position) then you need to use event driven VBA code.

An easier way to do this is to leave the value as entered then have another column (possibly hidden) that holds the multiplier.

For example if A1 holds your value, in B1 put the formula

Code:
B1: =IF(OR(A1=2, A1=3),3,1)

and you point to this multiplier from other referenced cells.

When I do this, it doesn't multiply the number by 3?
I'm happy with an extra column, is there no way there can just be *3 in the formula if the cell shows 2 or 3?

Thanks
 
Upvote 0
OK, just to be clear, what is "the result"?

Is this the value in A1, or is it in another cell?

If the first you can use

Code:
B1: =IF(OR(A1=2, A1=3),3,1)*A1

or if the second you point to the cell that contains "the result" e.g. C1

Code:
B1: =IF(OR(A1=2, A1=3),3,1)*C1
 
Upvote 0
OK, just to be clear, what is "the result"?

Is this the value in A1, or is it in another cell?

If the first you can use

Code:
B1: =IF(OR(A1=2, A1=3),3,1)*A1

or if the second you point to the cell that contains "the result" e.g. C1

Code:
B1: =IF(OR(A1=2, A1=3),3,1)*C1


That's brilliant! I used the first one..

Now, im sure this isn't possible but is there any way you could add to the formula " if the answer is 4 then minus 1 "

I think im pushing it haha, but with the results i want 4 cant be an answer, it will need to be changed to 3.

Thanks for all your help.
 
Upvote 0

Forum statistics

Threads
1,216,297
Messages
6,129,954
Members
449,544
Latest member
Akhil333

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