Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Data Query Formula

Ive been racking my brain trying to figure this out on my own but can't seem
to get it right. The problem that I have is I am trying to match phone
numbers in a column with a data base of the first 6 digits of the number that
I can call, and either get a true or fasle or any thing that will indicate
that I can call those numbers.

Example:
Number NPANXX Results
2813356789 281225 False
2813377896 281337 True
2815672345 281445 False
2813458765 False
2814452321 True

The results shoud be (False,True,False,False,True) in column C because the
number does not have the the first 6 digits
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Data Query Formula

One way ..

Assuming data in row2 down

In C2:
=SUMPRODUCT(--ISNUMBER(SEARCH($B$2:$B$4,A2)))0
Copy C2 down to return the required results

If there could be the possibility of blank cells within the reference set of
numbers in B2:B4, use this slightly longer version in C2, copied down:
=SUMPRODUCT(ISNUMBER(SEARCH($B$2:$B$4,A2))*($B$2:$ B$4<""))0

Adapt the reference range to suit: $B$2:$B$4
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Moses" wrote:
Ive been racking my brain trying to figure this out on my own but can't seem
to get it right. The problem that I have is I am trying to match phone
numbers in a column with a data base of the first 6 digits of the number that
I can call, and either get a true or fasle or any thing that will indicate
that I can call those numbers.

Example:
Number NPANXX Results
2813356789 281225 False
2813377896 281337 True
2815672345 281445 False
2813458765 False
2814452321 True

The results shoud be (False,True,False,False,True) in column C because the
number does not have the the first 6 digits

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Data Query Formula

Try something like this:

With your posted scenario

C2: =COUNTIF($B$2:$B$4,LEFT(A2,6))=1

Copy that formula down as far as you need

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Moses" wrote:

Ive been racking my brain trying to figure this out on my own but can't seem
to get it right. The problem that I have is I am trying to match phone
numbers in a column with a data base of the first 6 digits of the number that
I can call, and either get a true or fasle or any thing that will indicate
that I can call those numbers.

Example:
Number NPANXX Results
2813356789 281225 False
2813377896 281337 True
2815672345 281445 False
2813458765 False
2814452321 True

The results shoud be (False,True,False,False,True) in column C because the
number does not have the the first 6 digits

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 740
Default Data Query Formula

not sure

=ISNUMBER(SEARCH(a1,b$1:b$10,1))

happy holidays

"Moses" wrote:

Ive been racking my brain trying to figure this out on my own but can't seem
to get it right. The problem that I have is I am trying to match phone
numbers in a column with a data base of the first 6 digits of the number that
I can call, and either get a true or fasle or any thing that will indicate
that I can call those numbers.

Example:
Number NPANXX Results
2813356789 281225 False
2813377896 281337 True
2815672345 281445 False
2813458765 False
2814452321 True

The results shoud be (False,True,False,False,True) in column C because the
number does not have the the first 6 digits

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Data Query Formula

Dang! Could have sworn the earlier options worked fine <g
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


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
macro unouwanme Excel Discussion (Misc queries) 9 August 31st 06 09:38 PM
Get External Data - not editable using Query Wizard MargaretBeckbury Excel Discussion (Misc queries) 7 January 17th 06 09:13 AM
AHHH! Again JAA149 Excel Discussion (Misc queries) 0 October 31st 05 11:36 AM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM


All times are GMT +1. The time now is 05:49 AM.

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"