Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default Search and copy certain text

I am trying to find any instances of certain text in a column and if it
contains this text, I then want to copy a portion of this cell to another
cell.

eg
Column A contains first names and surnames
I would like to find all names with firstname John and then copy their
surname to another worksheet.
I can get the portion where it copies the surname but I am unable to search
for the first name and only report the instances that contain John.
A1 is where I type in the name that I want to find (The +3 is for the extra
spaces and other characters that are in the cell).
=IF(TRUE,MID(Sheet1!A3,(LEN($A$1)+3),20),)

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 179
Default Search and copy certain text

Hi

Your problem is not clear, but here i am giving you one solution according
to what I understood.

Eg: =MID(VLOOKUP("Jone*",$A$1:$A$10,1),FIND("
",VLOOKUP("Jone*",$A$1:$A$10,1),1),LEN(VLOOKUP("Jo ne*",$A$1:$A$10,1)))


"Rusty" wrote:

I am trying to find any instances of certain text in a column and if it
contains this text, I then want to copy a portion of this cell to another
cell.

eg
Column A contains first names and surnames
I would like to find all names with firstname John and then copy their
surname to another worksheet.
I can get the portion where it copies the surname but I am unable to search
for the first name and only report the instances that contain John.
A1 is where I type in the name that I want to find (The +3 is for the extra
spaces and other characters that are in the cell).
=IF(TRUE,MID(Sheet1!A3,(LEN($A$1)+3),20),)

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default Search and copy certain text

Thanks Muhammed. This is close but not quite there.

I will try and explain it better for you.

Sheet1
Column A
John Jackson
Paul Fredson
Jack May
Sam Gallagher
John Westbye

Sheet2
I type in "John" in Cell A1 because this is the name that I want the
surnames for.
The formula which is in Cell A2 down to A10 returns the following results
from the information on sheet1
Cell A2 = Jackson (This is from Sheet1 A1)
Cell A3 = Westbye (This is from Sheet1 A5)

I hope that explains in better.

"Muhammed Rafeek M" wrote:

Hi

Your problem is not clear, but here i am giving you one solution according
to what I understood.

Eg: =MID(VLOOKUP("Jone*",$A$1:$A$10,1),FIND("
",VLOOKUP("Jone*",$A$1:$A$10,1),1),LEN(VLOOKUP("Jo ne*",$A$1:$A$10,1)))


"Rusty" wrote:

I am trying to find any instances of certain text in a column and if it
contains this text, I then want to copy a portion of this cell to another
cell.

eg
Column A contains first names and surnames
I would like to find all names with firstname John and then copy their
surname to another worksheet.
I can get the portion where it copies the surname but I am unable to search
for the first name and only report the instances that contain John.
A1 is where I type in the name that I want to find (The +3 is for the extra
spaces and other characters that are in the cell).
=IF(TRUE,MID(Sheet1!A3,(LEN($A$1)+3),20),)

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
Matching Text with With Certain Criteria SteveC Excel Worksheet Functions 19 April 4th 06 12:08 PM
Finding Text To Copy To Another Worksheet roy.okinawa Excel Worksheet Functions 1 March 31st 06 07:03 AM
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 07:51 PM
Search and copy Hru48 Excel Discussion (Misc queries) 1 October 31st 05 04:56 PM
SEARCH COPY OF TEXT LinzNac Excel Discussion (Misc queries) 1 February 10th 05 01:39 AM


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