CF in a cell with 6 conditions

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
959
Office Version
  1. 2007
Platform
  1. Windows
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.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

ParamRay

Well-known Member
Joined
Aug 6, 2014
Messages
1,195
.
.

Please clarify: are you talking about conditional formatting or custom functions?
 

Ragnar1211

Well-known Member
Joined
Jul 10, 2008
Messages
571
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


=and(a1<B1,B1<C1,A1<C1)
=and(a1<B1,B1>=C1,A1<C1)
=and(a1<B1,B1>=C1,A1>=C1)
=and(a1>=B1,B1>=C1,A1>=C1)
=and(a1>=B1,B1<C1,A1>=C1)
=and(a1>=B1,B1>=C1,A1<C1)
 
Last edited:

Ragnar1211

Well-known Member
Joined
Jul 10, 2008
Messages
571

ADVERTISEMENT

giving up... formatting wins
 
Last edited:

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,797
Office Version
  1. 2010
Platform
  1. Windows
You need to put a space after < so it's not interpreted as the start of an html tag.
 

ztodd

Board Regular
Joined
Sep 17, 2014
Messages
221

ADVERTISEMENT

You need to put a space after < so it's not interpreted as the start of an html tag.
He doesn't use any... oh i see, he was probably trying to use one<s< html=""></s<>
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,797
Office Version
  1. 2010
Platform
  1. Windows
CF6=6: A1 is greater than or equal to B1; B1 is greater than or equal to C1 and A1 is less than C1
That one, at least, is impossible.
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,797
Office Version
  1. 2010
Platform
  1. Windows
Aside from the row with the question marks, does the result column look correct?

A​
B​
C​
D​
1​
A1
B1
C1
result
2​
0​
0​
0​
4​
3​
1​
0​
1​
5​
4​
0​
0​
1​
??​
5​
0​
1​
0​
3​
6​
0​
1​
1​
2​
7​
0​
1​
2​
1​

The formula in E2 and down is

=CHOOSE(4*(A2>=B2) + 2*(B2>=C2) + (A2>=C2) + 1, 1, "impossible", 2, 3, "??", 5, "impossible", 4)

What should be the result in row 4?
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,797
Office Version
  1. 2010
Platform
  1. Windows
Just need a place to park this:

A​
B​
C​
D​
E​
9​
Case
A1:B1
B1:C1
A1:C1
CF
10​
0​
<​
<​
<​
1​
11​
1​
<​
<​
>=​
impossible​
12​
2​
<​
>=​
<​
2​
13​
3​
<​
>=​
>=​
3​
14​
4​
>=​
<​
<​
??​
15​
5​
>=​
<​
>=​
5​
16​
6​
>=​
>=​
<​
impossible​
17​
7​
>=​
>=​
>=​
4​
 

Forum statistics

Threads
1,136,446
Messages
5,675,901
Members
419,591
Latest member
mersanko

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top