Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Compare String in Cell to an Array

I am wanting to take a string in a cell containing multiple data elements to
an array and have the data in the cell either trimmed or to highlight the
element that is matched in the array.

Example:

Cell B2 contains:
MROMANO | MTELLIG | JGURECK | MWOLK | LGAZDA | GVANBUH | CSHOAF | STILLER |
RVERBIC | DSTEPHE | BLANGLI

Cells AA2:AA10 contain the array for comparison.

I am not sure where to proceed from here since this appears a bit complex
from the onset. Thanks in advance for any insights.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Compare String in Cell to an Array

Hi,
What kind of comparison, what should the result be?
1- Return true if at least one element of B2 is found in AA2:AA10,
2- or Return an array of all elements of B2 found in AA2:AA10
3- or return a pipe (|) delimited string with all elements of B2 found in
AA2:AA10
4- or return the cells of AA2:AA10 having an matching element in B2
....
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"jbtenor1" wrote:

I am wanting to take a string in a cell containing multiple data elements to
an array and have the data in the cell either trimmed or to highlight the
element that is matched in the array.

Example:

Cell B2 contains:
MROMANO | MTELLIG | JGURECK | MWOLK | LGAZDA | GVANBUH | CSHOAF | STILLER |
RVERBIC | DSTEPHE | BLANGLI

Cells AA2:AA10 contain the array for comparison.

I am not sure where to proceed from here since this appears a bit complex
from the onset. Thanks in advance for any insights.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Compare String in Cell to an Array

Use the Find (case sensitive) or Search functions (case insensitive). These
are worksheet functions. See Excel help for details.

--
Regards,
Tom Ogilvy


"jbtenor1" wrote:

I am wanting to take a string in a cell containing multiple data elements to
an array and have the data in the cell either trimmed or to highlight the
element that is matched in the array.

Example:

Cell B2 contains:
MROMANO | MTELLIG | JGURECK | MWOLK | LGAZDA | GVANBUH | CSHOAF | STILLER |
RVERBIC | DSTEPHE | BLANGLI

Cells AA2:AA10 contain the array for comparison.

I am not sure where to proceed from here since this appears a bit complex
from the onset. Thanks in advance for any insights.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Compare String in Cell to an Array

I believe the best result would be for it to return the value(s) that match
one of the elementos in AA2:AA10. The majority of the time, it will just be
one, but it could be two values.

From the example below, if I could have B2 contain the string and a formula
in C2, C2 would give me the result of the match. For instance, AA2:AA10
contains:

ACLEMON
BDUFOUR
BLANGLI
DDILUCE
DWELLS
ESCOTT
KRENKER
THUMENI
WROCHES

If B2 contains:

MROMANO | MTELLIG | JGURECK | MWOLK | LGAZDA | GVANBUH | CSHOAF | STILLER |
RVERBIC | DSTEPHE | BLANGLI

C2 should return a result of BLANGLI. If there is more than one piece of
matching data, then it would be great if C2 displayed the multiple items in a
new pipe-delimited string. Then, I want to do this for the remaining cells
(B3 to B146) in a successive list. Hopefully, I've been a little more
succinct in my request this time. =)

Thanks again!

"sebastienm" wrote:

Hi,
What kind of comparison, what should the result be?
1- Return true if at least one element of B2 is found in AA2:AA10,
2- or Return an array of all elements of B2 found in AA2:AA10
3- or return a pipe (|) delimited string with all elements of B2 found in
AA2:AA10
4- or return the cells of AA2:AA10 having an matching element in B2
...
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"jbtenor1" wrote:

I am wanting to take a string in a cell containing multiple data elements to
an array and have the data in the cell either trimmed or to highlight the
element that is matched in the array.

Example:

Cell B2 contains:
MROMANO | MTELLIG | JGURECK | MWOLK | LGAZDA | GVANBUH | CSHOAF | STILLER |
RVERBIC | DSTEPHE | BLANGLI

Cells AA2:AA10 contain the array for comparison.

I am not sure where to proceed from here since this appears a bit complex
from the onset. Thanks in advance for any insights.

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
sum numbers in cell string array kookie Excel Worksheet Functions 6 April 10th 09 02:56 PM
FIND / SEARCH text compare cell to string in 3rd cell nastech Excel Discussion (Misc queries) 0 October 29th 07 02:51 AM
Compare text string of a cell in Column A VS another cell in Colum Tan New Users to Excel 2 August 1st 07 09:45 AM
Compare text string of a cell in Column A VS another cell in Colum Tan Excel Discussion (Misc queries) 1 August 1st 07 09:03 AM
Compare text string of a cell in Column A VS another cell in Colum Tan Excel Worksheet Functions 1 August 1st 07 09:01 AM


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

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

About Us

"It's about Microsoft Excel"