New If problem

Closed
Fatdog - Nov 3, 2009 at 08:33 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Nov 3, 2009 at 09:51 PM
Hello,

Im having some real problems trying to get an if formula to work. Well i think its an if formula i need.

I want a sum to take place based on one word or another sum to take place based on another word all from the same cell.

my formula i have at present could be way off but please advise if anyone can

=if(B11=Long,=[Sum(P11-G11)*Q11],=[sum(G11-P11)*Q11])

so if the word is short i want the outcome to be the sum of (G11-P11)*Q11 but if the word is long i want the outcome to be the sum of (P11-G11)*Q11.

any assistnce wold be great

regards

1 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Nov 3, 2009 at 09:51 PM
what is meant by
Sum(P11-G11)*Q11
it is simply (P11-G11)*Q11

I presume there are only two choices for B11 Long or short in that case
use this formula

=if(B11="LONG",(G11-P11)*Q11,(P11-G11)*A11)

this means if B11 is "Long" then it is (G11-P11)*Q11
otherwise (P11-G11)*Q11

where are going to park this formula NOT in B11 otherwise it will give circular refrence error.
0