# Thread: CF in a cell with 6 conditions

1. ## CF in a cell with 6 conditions

I want to formulate 6 CFs in a cell B1 to generate either of the value 1,2,3,4,5,6.

6 CFs are to be formulated to generate either of:
CF1=1: A1 is less than B1; B1 is less than C1 and A1 is less than C1
CF2=2: A1 is less than B1; B1 is greater than or equal to C1 and A1 is less than C1
CF3=3: A1 is less than B1; B1 is greater than or equal to C1 and A1 is greater than or equal to C1
CF4=4: A1 is greater than or equal to B1; B1 is greater than or equal to C1 and A1 is greater than or equal to C1
CF5=5: A1 is greater than or equal to B1; B1 is less than C1 and A1 is greater than or equal to C1
CF6=6: A1 is greater than or equal to B1; B1 is greater than or equal to C1 and A1 is less than C1

What should the formula be in the CF? Thanx in adv.  Reply With Quote

2. You can write a similar formula for each CF using:

Code:
`=AND(A1<B1,B1<C1,A1<C1)`
Just change the "<", ">", "<=", ">=" symbols around as required to meet your conditions.

However a word of caution; your logic doesn't work:

- CF6 is logically impossible;
- You have no CF that will identify (A1=1, B1=1, C1=2);
- CF4 meets several conditions: (A1=1, B1=1, C1=1) and (A1=2, B1=1, C1=1) and (A1=3, B1=2, A1=1) and (A1=2, B1=2, C1=1); and
- CF5 meets two conditions: (A1=3, B1=1, C1=2) and (A1=2, B1=1, C1=2).

Cheers,  Reply With Quote

3. However a word of caution; your logic doesn't work:

- CF6 is logically impossible;
- You have no CF that will identify (A1=1, B1=1, C1=2);
- CF4 meets several conditions: (A1=1, B1=1, C1=1) and (A1=2, B1=1, C1=1) and (A1=3, B1=2, A1=1) and (A1=2, B1=2, C1=1); and
- CF5 meets two conditions: (A1=3, B1=1, C1=2) and (A1=2, B1=1, C1=2).

CF6 (amended)=6:A1 is greater than or equal to B1; B1 is LESS THAN C1 and A1 is less than C1
CF5 to be made 2 parts: CF5 & CF7. CF5=5:
A1 is greater than or equal to B1; B1 is less than C1 and A1 is greater than C1
CF7=7:
A1 is greater than or equal to B1; B1 is less than C1 and A1 is equal to C1  Reply With Quote

4. For your nice' point: CF4 meets several conditions: (A1=1, B1=1, C1=1) and (A1=2, B1=1, C1=1) and (A1=3, B1=2, A1=1) and (A1=2, B1=2, C1=1)

Please ADD 3 more CFs (now totalling 10)
CF8=8: A1 is equal to B1; B1 is equal to C1 and A1 is equal to C1
CF9=9: A1 is greater than B1; B1 is greater than C1 and A1 is less than C1
CF10=10: A1 is equal to B1; B1 is greater than C1 and A1 is greater than C1

I hope all the conditions are met.  Reply With Quote

#### Tags for this Thread

conditional formatting #### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•