View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
excelnewbie excelnewbie is offline
external usenet poster
 
Posts: 1
Default Possible? find string and put in next cell...

Good morning!

Is this possible?
I have the following list:

LastName FirstName
Stevans variant Stevens Marilyn
Rogers Brendon variant Brendan

I would like to find the string "variant" and take what ever is after
it and put it in the cell under it along with the first or last name
that goes with it. ex:

LastName FirstName
Stevans Marilyn
Stevens Marilyn
Rogers Brendon
Rogers Brendan

I am thinking that I have to use something like:
If CellContainsText("variant") Then

cut what ever is after it and paste it in next cell with first or last
name then clean it??

ThisWorkbook.worksheets("Sheet1").Columns("A:B").c ells.Replace _
What:="variant", Replacement:="", _
SearchOrder:=xlByColumns, MatchCase:=True

?? any suggestions would be appreciated!

Thanks,
MC





------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/