countif with variabel criteria?

  • Thread starter Thread starter Hans
  • Start date Start date
H

Hans

Hi,

I'm blocked on a most likely very simple issue: I'm trying to have the
criteria in the countif function refer to a cell, so that the formula gives a
different result when that cell value is changed. I'm trying to compare
times in the [hh]:mm:ss format, and the 1904 date system is checked.

A B
17:05:33 20:00:00
20:19:22
32:53:00

formula's I've tried:
=countif (A1:A3,<B1)
=countif(A1:A3,"<B1")

Neither of them works apparently. Maybe I should be looking at another
function?

Thanks!!
 
Works like a charm! thx.

Bernard Liengme said:
Try =countif(A1:A3,"<"&B1)
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

Hans said:
Hi,

I'm blocked on a most likely very simple issue: I'm trying to have the
criteria in the countif function refer to a cell, so that the formula
gives a
different result when that cell value is changed. I'm trying to compare
times in the [hh]:mm:ss format, and the 1904 date system is checked.

A B
17:05:33 20:00:00
20:19:22
32:53:00

formula's I've tried:
=countif (A1:A3,<B1)
=countif(A1:A3,"<B1")

Neither of them works apparently. Maybe I should be looking at another
function?

Thanks!!
 
Back
Top