View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Referencing a range of columns and rows with the IF function


In this formula

=IF(COUNTIF(A1:AS3,1),1,"")

the first 1 is what you're counting within the range. If the count is 0
then the formula will return "", i.e. a blank, if the count is anything
else, i.e. 1 or higher the formula returns a 1.

If you were searching for something else in the range, e.g. a letter x
then the formula would be

=IF(COUNTIF(A1:AS3,"x"),1,"")


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=528879