Countif number in cell is higher than number in corresponding cell

dewotorf

New Member
Joined
Feb 25, 2021
Messages
19
Office Version
  1. 365
Platform
  1. Windows
Consider the table below. I want to count only cells in column C where the number is higher than the number in the corresponding cell in column B. Any advice on the code to use will be very much appreciated;

countifsnumber.xlsx
ABC
2CandidateTest1Test2
3AB17n/a
4AB23n/a
5AB33n/a
6AB43n/a
7AB537
8AB637
9AB737
10AB8ab7
11AB9ab3
12AB1023
13AB1117
14AB1237
15AB131DO
16AB14ab3
17AB15ab7
18AB1613
19AB17ab7
20AB18ab7
21AB1937
22AB20ab3
23AB21abDO
24AB22ab1
25AB23ab3
26AB24ab1
27AB25ab2
28AB2627
29AB2712
30AB2813
31AB291DO
32AB3033
33AB3113
34AB3233
35AB33ab1
36AB3417
37AB3533
38AB3611
39AB377do
40AB381do
41AB39DODO
42AB4017
43AB4137
44AB4237
45AB4337
46AB4433
47AB45ab7
48AB463n/a
49AB4737
50AB48ab7
51AB4973
52AB503n/a
53AB511n/a
54AB527n/a
55AB533n/a
56AB543n/a
57AB557n/a
58AB563n/a
59AB573n/a
Sheet2
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hi there, try this below. The first condition is for column comparison, the second to ensure it's a number column C.

Book1
ABC
1
2CandidateTest1Test2
3AB17n/a
4AB23n/a
5AB33n/a
6AB43n/a
7AB537
8AB637
9AB737
10AB8ab7
11AB9ab3
12AB1023
13AB1117
14AB1237
15AB131DO
16AB14ab3
17AB15ab7
18AB1613
19AB17ab7
20AB18ab7
21AB1937
22AB20ab3
23AB21abDO
24AB22ab1
25AB23ab3
26AB24ab1
27AB25ab2
28AB2627
29AB2712
30AB2813
31AB291DO
32AB3033
33AB3113
34AB3233
35AB33ab1
36AB3417
37AB3533
38AB3611
39AB377do
40AB381do
41AB39DODO
42AB4017
43AB4137
44AB4237
45AB4337
46AB4433
47AB45ab7
48AB463n/a
49AB4737
50AB48ab7
51AB4973
52AB503n/a
53AB511n/a
54AB527n/a
55AB533n/a
56AB543n/a
57AB557n/a
58AB563n/a
59AB573n/a
60
6118
Sheet1
Cell Formulas
RangeFormula
C61C61=SUMPRODUCT((C3:C59>B3:B59)*ISNUMBER(C3:C59))
 
Upvote 0
Solution
Hi,

From OP's previous thread here COUNTIFS WITH NUMERIC CONSTRAINT
in case there're blanks in B Column, may be this:

Book3.xlsx
ABCDEF
1CandidateTest1Test2
2AB17n/aCount17
3AB23n/a
4AB33n/a
5AB43n/a
6AB537
7AB637
8AB737
9AB87
10AB9ab3
11AB103
12AB1117
13AB1237
14AB131DO
15AB14ab3
16AB15ab7
17AB1613
18AB17ab7
19AB18ab7
20AB1937
21AB20ab3
22AB21abDO
23AB22ab1
24AB23ab3
25AB24ab1
26AB25ab2
27AB2627
28AB2712
29AB2813
30AB291DO
31AB3033
32AB3113
33AB3233
34AB33ab1
35AB3417
36AB3533
37AB3611
38AB377do
39AB381do
40AB39DODO
41AB4017
42AB4137
43AB4237
44AB4337
45AB4433
46AB45ab7
47AB463n/a
48AB4737
49AB48ab7
50AB4973
51AB503n/a
52AB511n/a
53AB527n/a
54AB533n/a
55AB543n/a
56AB557n/a
57AB563n/a
58AB573n/a
59
60
Sheet800
Cell Formulas
RangeFormula
F2F2=SUMPRODUCT((ISNUMBER(C2:C60)*(B2:B60<>"")*(C2:C60>B2:B60)))
 
Last edited:
Upvote 0
Hi there, try this below. The first condition is for column comparison, the second to ensure it's a number column C.

Book1
ABC
1
2CandidateTest1Test2
3AB17n/a
4AB23n/a
5AB33n/a
6AB43n/a
7AB537
8AB637
9AB737
10AB8ab7
11AB9ab3
12AB1023
13AB1117
14AB1237
15AB131DO
16AB14ab3
17AB15ab7
18AB1613
19AB17ab7
20AB18ab7
21AB1937
22AB20ab3
23AB21abDO
24AB22ab1
25AB23ab3
26AB24ab1
27AB25ab2
28AB2627
29AB2712
30AB2813
31AB291DO
32AB3033
33AB3113
34AB3233
35AB33ab1
36AB3417
37AB3533
38AB3611
39AB377do
40AB381do
41AB39DODO
42AB4017
43AB4137
44AB4237
45AB4337
46AB4433
47AB45ab7
48AB463n/a
49AB4737
50AB48ab7
51AB4973
52AB503n/a
53AB511n/a
54AB527n/a
55AB533n/a
56AB543n/a
57AB557n/a
58AB563n/a
59AB573n/a
60
6118
Sheet1
Cell Formulas
RangeFormula
C61C61=SUMPRODUCT((C3:C59>B3:B59)*ISNUMBER(C3:C59))
This worked perfectly. Much appreciated
 
Upvote 0
This worked perfectly. Much appreciated
I can't find where to do this on my page
1614394007175.png
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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