Dependent Ranking

Mparka

New Member
Joined
Mar 8, 2023
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hello, I have a table that looks like
Apple | manual input
Apple | manual input
Apple | manual input
Apple | blank cell
Apple | manual input
Apple | blank cell

This goes down 12 rows for each fruit, then starts a different one. I need a numeric count of each non blank input. For example, I want a third column that has 1,2,3,blank cell,4,blank cell. But when the fruit changes, I want to start the formulas over and go 1-12. I tried doing counta but the blank cells have formulas, and doing range sums doesn’t work because of the variable range. Thanks so much.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Book1
ABC
1Appletest1
2Apple 
3Appletest2
4Apple 
5Appletest3
6Apple 
7Appletest4
8Apple 
9Appletest5
10Apple 
11Appletest6
12Apple 
Sheet1
Cell Formulas
RangeFormula
C1:C12C1=IF(B1<>"",COUNTA($B$1:B1),"")


Something like this?
 
Upvote 0
Hi, see the linked file for a possible solution...

The formula used in the table:
=IF(OR(A2="",B2=""),"",IF(MOD(ROW()-1,12)=0,12,MOD(ROW()-1,12))-COUNTIFS(A$2:A2,A2,B$2:B2,""))

Fruits.xlsx

Fruits.png
 
Upvote 1
Solution
Hi, I am very glad that the formula works.
If I have enough knowledge, I am happy to help at any time.
 
Upvote 0
Why not using simple one like this, or I missed something? countif cell A, with B is <>""
Last 5.xlsx
ABC
1
2Appletest1
3Appletest2
4Appletest3
5Apple 
6Appletest4
7Apple 
8Appletest5
9Appletest6
10Appletest7
11Apple 
12Appletest8
13Apple 
14Orange 
15Orange 
16Orangeabc1
17Orangeabc2
18Orangeabc3
19Orangeabc4
20Orange 
21Orangeabc5
22Orange 
Sheet1
Cell Formulas
RangeFormula
C2:C22C2=IF(B2="","",COUNTIFS($A$2:A2,A2,$B$2:B2,"<>"))
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,543
Members
449,089
Latest member
davidcom

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