Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am trying to use the following IF function to search a range of cells to
find the number 1 and then return either 1 or leave the cell blank. However, it does not look at the range of cells. A4=IF(A1:AS3=1),1,"" Any sugestions would help. -- Cliff |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=IF(COUNTIF(A1:AS3,1)0,1,"")
-- Regards, Peo Sjoblom Northwest Excel Solutions www.nwexcelsolutions.com (remove ^^ from email address) Portland, Oregon "Cliff" wrote in message ... I am trying to use the following IF function to search a range of cells to find the number 1 and then return either 1 or leave the cell blank. However, it does not look at the range of cells. A4=IF(A1:AS3=1),1,"" Any sugestions would help. -- Cliff |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() If you want to return 1 if 1 occurs anywhere in that range =IF(COUNTIF(A1:AS3,1),1,"") -- daddylonglegs ------------------------------------------------------------------------ daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486 View this thread: http://www.excelforum.com/showthread...hreadid=528879 |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks, but what does the ,1 after the range A1:AS3 stand for?
-- Cliff "daddylonglegs" wrote: If you want to return 1 if 1 occurs anywhere in that range =IF(COUNTIF(A1:AS3,1),1,"") -- daddylonglegs ------------------------------------------------------------------------ daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486 View this thread: http://www.excelforum.com/showthread...hreadid=528879 |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() 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 |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I really need to just identify 1 only and nothing higher i.e =1
-- Cliff "daddylonglegs" wrote: 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 |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Not quite sure what you're saying. Do you want the formula to return a 1 only when there is only a single 1 in the range? If so =IF(COUNTIF(A1:AS3,1)=1,1,"") -- daddylonglegs ------------------------------------------------------------------------ daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486 View this thread: http://www.excelforum.com/showthread...hreadid=528879 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to swap rows and columns? | Excel Discussion (Misc queries) | |||
Help PLEASE! Not sure what answer is: Match? Index? Other? | Excel Worksheet Functions | |||
Hide columns & rows that contain "0" or blank in a range of cells | Excel Worksheet Functions | |||
inserting columns within certain rows only | Excel Discussion (Misc queries) | |||
extract data from a range of cells in rows or columns when a date. | Excel Worksheet Functions |