Solution without VBA:
In entire Column C insert formula:
=IF(ISERROR(SEARCH("(U)",A
In Column B:
=IF(ISERROR(SEARCH("(E)",A
etc...
Or use FIND insted of SEARCH, or RIGHT...
Main Topics
Browse All TopicsHi,
I have what I would expect to be a fairly simple request, but I can't figure out how to do it. What I'd like to do is have Excel go through my list of rows in a single column and if a row contains a specific piece of text within the field move that entire field to Column C. Let me give an example
Column A Column B Column C
John T Richards (U)
Paul R Samson (E)
Terri Reynalds (U)
I'd like to have Excel go through Column A and find every row that
contains (U) and if (U) is found move the entire piece of data to the same
row but in column C, so the final sort would look like:
Column A Column B Column C
John T Richards (U)
Paul R Samson (E)
Terri Reynalds (U)
Finish. So can anyone help me with this? Also, if its not too difficult, would it be possible to
explain how to do the above with 2 or more conditions? Ex: (U) goes to Column C, but if a
field has (E) then put it in Column B. Can this be done?
I appreciate any help I can get.
Sincerely,
John
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: shagerPosted on 2003-05-21 at 12:04:06ID: 8559070
Dim MyCell As Range
Sub aaa()
For Each MyCell In Selection
If InStr(MyCell.Value, "(U)") Then
MyCell.Offset(0, 2).Value = MyCell.Value 'Moves two columns to Right
MyCell.Clear
End If
If InStr(MyCell.Value, "(E)") Then
MyCell.Offset(0, 1).Value = MyCell.Value 'Moves one column to Right
MyCell.Clear
End If
Next
End Sub
Highlite your range then run macro