Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Iain - T
 
Posts: n/a
Default how do I check if known number is in array

I want to check if a known number appears in a column of cells. If it does
then I want a "1" to appear if not then I want a "0" to appear.

In cell F23 I have used =IF(F2:F8="1",1,0) and =IF(F2:F8=D23,1,0), where
cells F2 to F8 contain various numbers to be checked against the number "1"
or the value of D23 (which in this case equals 1.)

All I get is a #VALUE in the

I would then check F2 to F8 against D24 (=2) or the number 2

I think the answer may be simple, but I just cannot see it

  #4   Report Post  
Posted to microsoft.public.excel.misc
Dana DeLouis
 
Posts: n/a
Default how do I check if known number is in array

Just another option...

=SIGN(COUNTIF(F2:F8,1))

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"Iain - T" wrote in message
...
Thanks Bob,

I tried but still does not work.......... any other ideas?

"Bob Phillips" wrote:

=IF(COUNTIF(F2:F8),1)0,1,0)

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Iain - T" <Iain - wrote in message
...
I want to check if a known number appears in a column of cells. If it

does
then I want a "1" to appear if not then I want a "0" to appear.

In cell F23 I have used =IF(F2:F8="1",1,0) and =IF(F2:F8=D23,1,0),
where
cells F2 to F8 contain various numbers to be checked against the number

"1"
or the value of D23 (which in this case equals 1.)

All I get is a #VALUE in the

I would then check F2 to F8 against D24 (=2) or the number 2

I think the answer may be simple, but I just cannot see it






  #5   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default how do I check if known number is in array

Is this what you're looking for?

=--(SUMPRODUCT((F2:F8=1)+(F2:F8=D23))0)

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Iain - T" wrote:

I want to check if a known number appears in a column of cells. If it does
then I want a "1" to appear if not then I want a "0" to appear.

In cell F23 I have used =IF(F2:F8="1",1,0) and =IF(F2:F8=D23,1,0), where
cells F2 to F8 contain various numbers to be checked against the number "1"
or the value of D23 (which in this case equals 1.)

All I get is a #VALUE in the

I would then check F2 to F8 against D24 (=2) or the number 2

I think the answer may be simple, but I just cannot see it



  #6   Report Post  
Posted to microsoft.public.excel.misc
Cutter
 
Posts: n/a
Default how do I check if known number is in array


Bob's formula was correct but had an extra bracket that caused an error

Instead of:
=IF(COUNTIF(F2:F8),1)0,1,0)

Use:
=IF(COUNTIF(F2:F8,1)0,1,0)


--
Cutter
------------------------------------------------------------------------
Cutter's Profile: http://www.excelforum.com/member.php...fo&userid=9848
View this thread: http://www.excelforum.com/showthread...hreadid=505692

  #7   Report Post  
Posted to microsoft.public.excel.misc
Iain - T
 
Posts: n/a
Default how do I check if known number is in array

Thanks Ron,

I would never have got that ....... have plugged in the formula..... Great!

Cheers Mate............. Iain

"Ron Coderre" wrote:

Is this what you're looking for?

=--(SUMPRODUCT((F2:F8=1)+(F2:F8=D23))0)

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Iain - T" wrote:

I want to check if a known number appears in a column of cells. If it does
then I want a "1" to appear if not then I want a "0" to appear.

In cell F23 I have used =IF(F2:F8="1",1,0) and =IF(F2:F8=D23,1,0), where
cells F2 to F8 contain various numbers to be checked against the number "1"
or the value of D23 (which in this case equals 1.)

All I get is a #VALUE in the

I would then check F2 to F8 against D24 (=2) or the number 2

I think the answer may be simple, but I just cannot see it

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
How do I check repeating sets of number in a range Tshidiso Excel Worksheet Functions 1 September 2nd 05 11:02 AM
Formula to count number of dates in an array Lilasviolet Excel Worksheet Functions 2 April 7th 05 07:44 PM
What is the maximum allowed number of data elements in a data array? [email protected] Excel Discussion (Misc queries) 2 April 7th 05 06:56 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 04:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"