Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
peacelittleone
 
Posts: n/a
Default check if value occurs within a range


I have the following in column A :

A
1
2
3 4
3 4 5
3
4
5
1 3


How do I find out if the number 1 is found in Column A. Column A
contains either a single entry or multiple entries separated by
"ALT+Enter" (Chr(10)).

I don't care if it is there more than once, only if it is there at
all.

Any suggestions?

TIA

Heather.


--
peacelittleone


------------------------------------------------------------------------
peacelittleone's Profile: http://www.excelforum.com/member.php...o&userid=20937
View this thread: http://www.excelforum.com/showthread...hreadid=383726

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Heather,

This any good?

=COUNTIF(A:A,1)+COUNTIF(A:A,"1"&CHAR(10)&"*")+COUN TIF(A:A,"*"&CHAR(10)&"1")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"peacelittleone"
<peacelittleone.1rgmeo_1120169190.0972@excelforu m-nospam.com wrote in
message news:peacelittleone.1rgmeo_1120169190.0972@excelfo rum-nospam.com...

I have the following in column A :

A
1
2
3 4
3 4 5
3
4
5
1 3


How do I find out if the number 1 is found in Column A. Column A
contains either a single entry or multiple entries separated by
"ALT+Enter" (Chr(10)).

I don't care if it is there more than once, only if it is there at
all.

Any suggestions?

TIA

Heather.


--
peacelittleone


------------------------------------------------------------------------
peacelittleone's Profile:

http://www.excelforum.com/member.php...o&userid=20937
View this thread: http://www.excelforum.com/showthread...hreadid=383726



  #3   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

Given that E2: 1

=(COUNTIF(A:A,E2)+COUNTIF(A:A,"*"&E2&"*"))0

peacelittleone wrote:
I have the following in column A :

A
1
2
3 4
3 4 5
3
4
5
1 3


How do I find out if the number 1 is found in Column A. Column A
contains either a single entry or multiple entries separated by
"ALT+Enter" (Chr(10)).

I don't care if it is there more than once, only if it is there at
all.

Any suggestions?

TIA

Heather.


  #4   Report Post  
peacelittleone
 
Posts: n/a
Default


This is what ended up working:

=COUNTIF($A$1:$A$7,B1)+COUNTIF($A$1:$A$7,B1&CHAR(1 0)&"*")+COUNTIF($A$1:$A$7,"*"&CHAR(10)&B1)+COUNTIF ($A$1:$A$7,"*"&CHAR(10)&B1&CHAR(10)&"*")

Where I had to conver the values in column B to text:
=text(B1,"0")


Thanks for getting me started!

Heather.


--
peacelittleone


------------------------------------------------------------------------
peacelittleone's Profile: http://www.excelforum.com/member.php...o&userid=20937
View this thread: http://www.excelforum.com/showthread...hreadid=383726

  #5   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

I think you want the formula distinguish between true 1 and 1 that
occurs in such items like 11...

=SUMPRODUCT(ISNUMBER(SEARCH(CHAR(10)&B1&CHAR(10),C HAR(10)&$A$1:$A$7&CHAR(10)))+0)0

would be more compact.

peacelittleone wrote:
This is what ended up working:

=COUNTIF($A$1:$A$7,B1)+COUNTIF($A$1:$A$7,B1&CHAR(1 0)&"*")+COUNTIF($A$1:$A$7,"*"&CHAR(10)&B1)+COUNTIF ($A$1:$A$7,"*"&CHAR(10)&B1&CHAR(10)&"*")

Where I had to conver the values in column B to text:
=text(B1,"0")


Thanks for getting me started!

Heather.




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
How do I have a formula check if a value occurs within a range? afgncaap Excel Worksheet Functions 3 June 1st 05 06:44 PM
Can a formula check for a certain value in a range? Lee IT Excel Discussion (Misc queries) 3 April 8th 05 07:36 AM
can a formula check for a certain value in a range? Lee IT Excel Discussion (Misc queries) 1 April 7th 05 04:31 PM
check occurrence of items in a range Jack Sons Excel Discussion (Misc queries) 3 February 17th 05 11:50 PM
How can I check if data in an external data range is changed afte. Ruud Excel Worksheet Functions 0 January 7th 05 12:15 PM


All times are GMT +1. The time now is 01:34 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"