SOLVED

IF - HELP...

Copper Contributor

HELP... I want to do a separate calculation with anwers in 2 different cells 

There is a fixed value in A1 and B1 and C1 and the calculation will be (A1*B1*C1)

 

BUT... the answer will be in different cells depending on value in D1 or E1

If D1 has a value of 1 the answer is gonna show in H1, like  (H1=A1*B1*C1)

If E1 has value of 1 the answer is gonna show in G1, like (G1=A1*B1*C1)

 

If D1 or E1 has a value of 0, then colums of H1 or G1 be left empty.

 

Dont find the words to describe it better ;)

Hope someone understands my bad english, and help me... ;)

 

 

 

 

13 Replies
Hi Cronis
You could try
H1 =if(D1=1,A1*B1*C1,"")
G1 =if(E1=1,A1*B1*C1,"")

@Wildecoyote1966 

Hi thanks for your help..

Tried it..but did not get it to function ? Probably did something wrong...

just got red...

 

Skärmbild 2022-03-16 020835.jpg

Have you got a space at the front?

upload a file

No just centered columns

file attached

@Wildecoyote1966 

place an = at the front

@Wildecoyote1966 

Did that too.. but got only this instead...

 

1 Skärmbild 2022-03-16 024851.jpg

=IF(D1=1,A1*B1*C1,"")
exactly it works for me
Normally when I put a = in a cell, the calculation is hidden when I push enter.. But now I can se =IF(D1=1,A1*B1*C1,"") in clear?
Maybe there is something I have done with the settings or not have done? Thats why its not working?

@Cronis 

  • Make sure that the cells with the formulas are formatted as General, not as Text.
  • If that does not help, activate the Formulas tab of the ribbon and make sure that the Show Formulas button in the Formula Auditing group is not highlighted.

@Cronis 

=IF(D1=1,A1*B1*C1,"") says this cell  equals to if D1 is equal to 1, then A1*B1*C1 otherwise show nothing (blank)

 

If you have no spaces it should work but you may have to format the cell as a number.

 

Sorry I can't see what is wrong.

Make sure there are no doubles like  ,,

no spaces

Oh and what @Hans Vogelaar said to (sorry Hans)

@Wildecoyote1966 

Cronis_0-1648542117325.png

Tried to copy your code, but only get red dots around the cell, telling med that something is wrong.

Ande the code still is visual when I hit enter?

Have a swedish version of excel.. does that make any difference?

 

best response confirmed by Cronis (Copper Contributor)
Solution

@Cronis Try with semi-colons between the arguments rather than commas and use OM rather than IF.

Attaching your file with a working formula. It should "translate" to the Swedish format automatically.

 

=OM(D1=1;A1*B1*C1;"")

WOW.. At last.. NOW its working.. :) Tjo hooo
Thanks for all input from everyone

//@
1 best response

Accepted Solutions
best response confirmed by Cronis (Copper Contributor)
Solution

@Cronis Try with semi-colons between the arguments rather than commas and use OM rather than IF.

Attaching your file with a working formula. It should "translate" to the Swedish format automatically.

 

View solution in original post