Ask Your Question
0

formula help needed

asked 2016-05-11 21:18:52 +0100

thickone gravatar image

I need to have a formula where a cell is multiplied depending on a Y or N in another cell. If Y *2, if N *1. I can make a formula to do one calculation but not work out how to do the full thing'

So far ive come up with: e.g. formula in C3 would be =IF((B3="Y"),A32) that seems to work,but i cannot make it do the "N"),A31 part.

Any help greatly recieved.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-05-11 22:14:41 +0100

Ratslinger gravatar image

Something like =IF((B3="Y"),A32,(IF(B3="N",A31))) - If B3 is "Y" will display contents of A32; If B3 is "N" will display contents of A31; If B3 NOT "Y" or "N" will display 0.

Your question is not completely clear on the results wanted.

Syntax:
IF(Test; ThenValue; OtherwiseValue)
edit flag offensive delete link more

Comments

Thanks Ratslinger. My post should have said e.g. formula in C3 would be =IF((B3="Y"),A32) that seems to work,but i cannot make it do the "N"),A31 part. The * went missing! On one sheet your formula works, but on another the answer comes up as TRUE or FALSE rather than an actual answer. Yet again when this forums system uploads a comment it removes the *. so should be =IF((B3="Y"),A3 * 2) without the gaps!

thickone gravatar imagethickone ( 2016-05-15 10:31:14 +0100 )edit

For your TRUE/FALSE, the format of the cell is probably set to Boolean - Change to Number. For some explanation on that see remark by @Lupp in this Post. For your * not working, it's the way you are pasting the code. Use one of the blocking formats.

Ratslinger gravatar imageRatslinger ( 2016-05-15 16:33:46 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-05-11 21:18:52 +0100

Seen: 23 times

Last updated: May 11 '16