Difficult Count if Question

Jose Miguel

Board Regular
Joined
Feb 3, 2005
Messages
99
Hello All,

I have a rather hard question to pose. At every point where there is a value in column D, I want to be able to do a countif of the values in column F, with the range being the corresponding cell in F where the value is on column D to the point above the next value in column D in F. In other words, if there is a value in D1 and the next populated value is in D20, the countif should count F1 to F19. I hope this makes sense!

Thanks

Jose
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
How's this:
Book1
DEFGH
1 tom
2 ****
3 harry
41 polly
5 kelley
6 john
7 jane
8 scott
9 bubba
10 bueford
11 jethro
12 tom
1321****
14 harry
15 polly
16 kelley
17 john
18 tom
19 scott
20 tom
21 bueford
22 jethro
23 tom
24 ****
25103harry
26 polly
27 kelley
Sheet3


E2 is =IF(AND(D2<>"",COUNTA($D$1:D1)>0),SUM(IF(ROW($D$1:D1)>MAX(IF($D$1:D1<>"",ROW($D$1:D1),0)),IF($F$1:F1=$H$1,1,0),0)),"") confirmed with Ctrl+Shift+Enter and copied down. Will count the number of times that the value in H1 appears in column F...
 
Upvote 0
Hello All,

I have a rather hard question to pose. At every point where there is a value in column D, I want to be able to do a countif of the values in column F, with the range being the corresponding cell in F where the value is on column D to the point above the next value in column D in F. In other words, if there is a value in D1 and the next populated value is in D20, the countif should count F1 to F19. I hope this makes sense!

Thanks

Jose

What sort of values do you have in column D, numbers or text? What do you want to count in column F?
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,816
Members
449,049
Latest member
cybersurfer5000

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