I am trying to count how many cells in a particular column have a higher value than the cell below them. This is how far I've gotten, but it doesn't work (it always returns 0, even if there is at least one cell bigger than the one below it):
=COUNTIF(B4:B500,">"&OFFSET(INDIRECT(ADDRESS(ROW(),COLUMN())),1,0))
Background (in case anyone is wondering): I am using this to check if the values in this column are properly sorted (i.e. starting with the lowest value and moving down to the highest). If the formula returns a value greater than 1, I know that the list is not fully sorted.