Countif down to last row

thedeadzeds

Active Member
Joined
Aug 16, 2011
Messages
450
Office Version
  1. 365
Platform
  1. Windows
Hi Guys,

Is there a way to change the formula so that this part '=INT(COUNTIF($K$2:$K$2000" copys down to the last row in column K. So the $K$2000 part. At the moment i have to change this manually

Code:
[TABLE="width: 121"]
<tbody>[TR]
[TD="class: xl64, width: 121"] =IF(COUNTIF(K$2:K2,K2)<=INT(COUNTIF($K$2:$K$2000,K2)/COUNTA(Blue_Team_Names[Blue]))*COUNTA(Blue_Team_Names[Blue]),INDEX(Blue_Team_Names[Blue],MOD(COUNTIF(K$2:K2,K2)-1,COUNTA(Blue_Team_Names[Blue]))+1),"Not  allocated")[/TD]
[/TR]
</tbody>[/TABLE]

<tbody> </tbody>
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Replace K2000 with INDEX(K:K,MATCH(9.99999999999999E307,K:K)) if the col contains numbers or INDEX(K:K,MATCH(REPT("Z",255),K:K)) for text
 
Upvote 0
If you are changing that value because the data might go to row 2,000 or 1,800 or 2,500, could you just change it once to, for example, say 10,000 or some other figure that will always be bigger than your data?
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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