Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
J.J.
 
Posts: n/a
Default Find Matching Text In Col A move to Col B

I been searching for but can't find the answer to this question.

I have a list of names in column A:

Jim Jones
Jane Smith Barney
Todd Davis
Pete Smith
Ron Jones
etc.

Is there a function that I can use that would search for "Smith" names and
move them to Column B then perhaps using a macro repeat and have all
"Jones" names moved to Column C so that eventually I would end up with -

Col A Col B Col C
Todd Davis Jane Smith Barney Jim Jones
Pete Smith Ron Jones


I would greatly appreciate any help with this!


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RagDyeR
 
Posts: n/a
Default Find Matching Text In Col A move to Col B

You could try this:

With the list of names in Column A, starting in A2,
Enter the sir names in Row1 of each column, i.e.:
B1 - Smith
C1 - Jones
D1 - Davis
etc.,

Then, enter this formula in B2:

=IF(ISNUMBER(SEARCH(B$1,$A2)),$A2,"")

And copy across as many columns as needed,
Then, select the formula cells in Row 2, and copy down as needed.
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"J.J." wrote in message
et...
I been searching for but can't find the answer to this question.

I have a list of names in column A:

Jim Jones
Jane Smith Barney
Todd Davis
Pete Smith
Ron Jones
etc.

Is there a function that I can use that would search for "Smith" names and
move them to Column B then perhaps using a macro repeat and have all
"Jones" names moved to Column C so that eventually I would end up with -

Col A Col B Col C
Todd Davis Jane Smith Barney Jim Jones
Pete Smith Ron Jones


I would greatly appreciate any help with this!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Find Matching Text In Col A move to Col B

This seemed to work ok for me:

I used 3 columns though (and deleted column A later).

In B1, I put this:
=IF(COUNTIF(C1:D1,"#n/a")=2,A1,NA())

In c1, I put this:
=IF(ISNUMBER(SEARCH("smith",A1)),A1,NA())

In D1, I put this:
=IF(ISNUMBER(SEARCH("Jones",A1)),A1,NA())

And I dragged down the range. I ended up with something that looked like:

Jim Jones #N/A #N/A Jim Jones
Jane Smith Barney #N/A Jane Smith Barney #N/A
Todd Davis Todd Davis #N/A #N/A
Pete Smith #N/A Pete Smith #N/A
Ron Jones #N/A #N/A Ron Jones

Then I selected columns C:E
edit|copy
Edit|paste special|Values

And with C:E still selected
Edit|goto|special
Constants (but only leave Errors checked)
Then ok out of that dialog

Edit|delete|shift cells up

And I deleted column A and I ended up with:

Todd Davis Jane Smith Barney Jim Jones
Pete Smith Ron Jones




"J.J." wrote:

I been searching for but can't find the answer to this question.

I have a list of names in column A:

Jim Jones
Jane Smith Barney
Todd Davis
Pete Smith
Ron Jones
etc.

Is there a function that I can use that would search for "Smith" names and
move them to Column B then perhaps using a macro repeat and have all
"Jones" names moved to Column C so that eventually I would end up with -

Col A Col B Col C
Todd Davis Jane Smith Barney Jim Jones
Pete Smith Ron Jones

I would greatly appreciate any help with this!


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
J.J.
 
Posts: n/a
Default Find Matching Text In Col A move to Col B

Both ideas work - Thanks for the help!

JJ


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
Find text and copy and move row containing it gjpcoach Excel Discussion (Misc queries) 5 February 24th 06 08:32 PM
Find last occurance of character in text string JDay01 Excel Worksheet Functions 2 February 14th 06 04:29 PM
Find largest alphanumeric value matching alpha criteria in databas Alison Excel Worksheet Functions 7 August 4th 05 06:59 PM
Find Matching Records in Two Worksheets kittybat Excel Discussion (Misc queries) 2 April 5th 05 06:51 PM
Find matching records in two worksheets kittybat Excel Discussion (Misc queries) 3 March 30th 05 12:11 AM


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