• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

If aused several times

Len

New Member
Hi all,


I am trying to work out the following by using the if statement, at one stage the answer will equal to an other but it is OK


I have 4 Columns A, B, C an D


D is were I want the formula


In the 3 cells, there is a combination of results,


A1 B1 C1 D1 = the result of A1, B1, C1


First combination 0 0 0 1

1 1 0 2

0 0 1 3

0 1 1 4

1 0 1 4 this is correct 2 x 4's

1 1 1 5


I am trying to have one formula in D1 to give me the rsult from a combination


This formula is then to be copied down Column D


Any help would be great.


Thanks


Len
 
Hi Amrit1186


If A1=0 and B1=0 and C1=0 then D1 = 1 or

If A1=1 and B1=1 and C1=0 then D1 = 2 or

If A1=0 and B1=0 and C1=1 then D1 = 3 or

If A1=0 and B1=1 and C1=1 then D1 = 4 or

If A1=1 and B1=0 and C1=1 then D1 = 4 or

If A1=1 and B1=1 and C1=1 then D1 = 5


Hope this makes more sense.


Thanks


Len
 
Hi Len..


I am not sure.. what exactly you want.. but..

I think below formula works for you..


Code:
=INDEX({1,2,3,4,4,5},MATCH(A1&B1&C1,{"000";"110";"001";"011";"101";"111"},0))


Please let us know.. if the above is your requirement.. :)


Regards,

Deb
 
Hi Len,


What if A1=1 and B1=0 and C1=0 then what does D1 = ?


I'm trying to understand the logic here?
 
Hi Len ,


I am not sure about your logic , but if the above combinations are the only ones possible , then a simple formula such as :


=MAX(1,3*C1+A1+B1)


will do the job. Put this in D1 , and copy down.


Narayan
 
Back
Top