filter or remove pieces of sequences

laszlos

New Member
Joined
Nov 29, 2009
Messages
2
I have a column with thousands of rows like this:

actgctgattgATGGCTGRSTYGG etc., i.e. about 1000 lowercase letters followed by hundreds of capitals always starting with ATG.

I need to remove anything from the ATG on (i.e. all capitals) so that only lowercase letters remain in the column. Alternatively, only the lowercase bunches of letters could be copied to a new column.

I would highly appreciate help on this!

Thanks and greetings,

laszlos
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
I have a column with thousands of rows like this:

actgctgattgATGGCTGRSTYGG etc., i.e. about 1000 lowercase letters followed by hundreds of capitals always starting with ATG.

I need to remove anything from the ATG on (i.e. all capitals) so that only lowercase letters remain in the column. Alternatively, only the lowercase bunches of letters could be copied to a new column.

I would highly appreciate help on this!

Thanks and greetings,

laszlos
Welcome to the MrExcel board!

Try this:

1. Select the column by clicking its heading label.

2. Edit|Replace...|Find what: ATG*|Replace with: leave blank|Options>>|tick 'Match case'|Replace All|Ok|Close
 
Upvote 0
Hi PGC and Peter,

Thanks a lot, you both made my life easier :-).
I notice that TextToColumns not simply splits the text into two columns but also removes the delimiter (in this case A). It is no problem right now but later I might need to save both parts intact. Is there a way to do it?

Thanks,

Laszlo
 
Upvote 0
I notice that TextToColumns not simply splits the text into two columns but also removes the delimiter (in this case A). It is no problem right now but later I might need to save both parts intact. Is there a way to do it?

Laszlo

TextToColumns eats the delimiters. If you need both parts of the strings, better copy the column and use Peter's solution, to get what's before ATG. You can then get what's after ATG for ex. with a string function. If the ATG string only occurs once in the text, you can also use Peter's solution to get the second part, replacing *ATG with ATG.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top