Formula Help - High to Low and Odd to Even

ststern45

Well-known Member
Joined
Sep 17, 2005
Messages
974
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hello everyone,

I have 2 requests but they refer to the same cell range

Cell range = A1 through C1

Example: Each cell can have a value from 0 through 9

A1 = 0
B1 = 0
C1 = 0

Even to Even formula
A1 = 0 (even)
B1 = 0 (even)
C1 = 0 (even)

So the result would be 2 (even follows an even (B1 from A1) & even follows an even C1 follows B1)

Also need formulas for the following

Even to Odd
Odd to Even
Odd to Odd

Low to High (Low digits = 0,1,2,3,4 High digits = 5,6,7,8,9)
Low to Low
High to Low
High to High

Thank you in advance!!
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
[Table="width:, class:grid"][tr][td="bgcolor:#C0C0C0"][/td][td="bgcolor:#C0C0C0"]
A​
[/td][td="bgcolor:#C0C0C0"]
B​
[/td][td="bgcolor:#C0C0C0"]
C​
[/td][td="bgcolor:#C0C0C0"]
D​
[/td][td="bgcolor:#C0C0C0"]
E​
[/td][td="bgcolor:#C0C0C0"]
F​
[/td][td="bgcolor:#C0C0C0"]
G​
[/td][td="bgcolor:#C0C0C0"]
H​
[/td][td="bgcolor:#C0C0C0"]
I​
[/td][/tr][tr][td="bgcolor:#C0C0C0"]
1​
[/td][td="bgcolor:#F3F3F3"]
num1
[/td][td="bgcolor:#F3F3F3"]
num2
[/td][td="bgcolor:#F3F3F3"]
num3
[/td][td="bgcolor:#F3F3F3"]
E-E
[/td][td="bgcolor:#F3F3F3"]
O-O
[/td][td="bgcolor:#F3F3F3"]
E-O
[/td][td="bgcolor:#F3F3F3"]
L-H
[/td][td="bgcolor:#F3F3F3"]
[/td][td="bgcolor:#F3F3F3"]
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
2​
[/td][td]
0​
[/td][td]
2​
[/td][td]
9​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td][/td][td]D2: =SUMPRODUCT((MOD($A2:$B2, 2) = MOD($B2:$C2, 2)) * (MOD($A2:$B2, 2) = 0))[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
3​
[/td][td]
1​
[/td][td]
7​
[/td][td]
0​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td][/td][td]E2: =SUMPRODUCT((MOD($A2:$B2, 2) = MOD($B2:$C2, 2)) * (MOD($A2:$B2, 2) = 1))[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
4​
[/td][td]
2​
[/td][td]
6​
[/td][td]
4​
[/td][td="bgcolor:#E5E5E5"]
2​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td][/td][td]F2: =SUMPRODUCT((MOD($A2:$B2, 2) <> MOD($B2:$C2, 2)) * (MOD($A2:$B2, 2) = 0))[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
5​
[/td][td]
1​
[/td][td]
4​
[/td][td]
5​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td][/td][td]G2: =SUMPRODUCT(($A2:$B2 < 5) * ($B2:$C2 >= 5))[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
6​
[/td][td]
9​
[/td][td]
3​
[/td][td]
7​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
2​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
7​
[/td][td]
6​
[/td][td]
0​
[/td][td]
1​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
8​
[/td][td]
3​
[/td][td]
1​
[/td][td]
3​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
2​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
9​
[/td][td]
0​
[/td][td]
6​
[/td][td]
9​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
10​
[/td][td]
2​
[/td][td]
2​
[/td][td]
4​
[/td][td="bgcolor:#E5E5E5"]
2​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
11​
[/td][td]
6​
[/td][td]
4​
[/td][td]
9​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
12​
[/td][td]
4​
[/td][td]
9​
[/td][td]
0​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
13​
[/td][td]
8​
[/td][td]
9​
[/td][td]
0​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
14​
[/td][td]
0​
[/td][td]
2​
[/td][td]
0​
[/td][td="bgcolor:#E5E5E5"]
2​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
15​
[/td][td]
4​
[/td][td]
4​
[/td][td]
6​
[/td][td="bgcolor:#E5E5E5"]
2​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
16​
[/td][td]
5​
[/td][td]
4​
[/td][td]
9​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
17​
[/td][td]
0​
[/td][td]
1​
[/td][td]
7​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
18​
[/td][td]
0​
[/td][td]
8​
[/td][td]
9​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
19​
[/td][td]
0​
[/td][td]
8​
[/td][td]
3​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
20​
[/td][td]
3​
[/td][td]
1​
[/td][td]
5​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
2​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
21​
[/td][td]
2​
[/td][td]
6​
[/td][td]
5​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
0​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td="bgcolor:#E5E5E5"]
1​
[/td][td][/td][td][/td][/tr]
[/table]


I'll let you play with the others.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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
Back
Top