View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default How to test if the end character of a string is within auser-defined list?

Assuming your data is in column A starting with A1, try this in B1:

=IF(OR(ISNUMBER(A1),RIGHT(A1,1)="a"),A1,"remove")

then copy the formula down as required.

If you want to remove the rows that do not meet the criteria, then
apply autofilter to column B. Choose "remove" from the filter pull-
down, highlight all visible rows and Edit | Delete Row. Then select
All from the pull-down. You could then delete column B.

Hope this helps.

Pete

On Feb 22, 12:13*pm, T2net wrote:
On 22 fév, 12:57, Pete_UK wrote:





I think you need to give some further examples showing some which
would fail your criteria, as it looks to me as if they would all pass.


Pete


On Feb 22, 11:22*am, T2net wrote:


Hello,


I have a list in column which may look like


1
2
3a
3b
3g
56
67a
67c


I would like to keep only the rows which contains numbers or numbers +
a character.


Any idea?


Thanks, T2net


MS VB 6.3, Excel 2003, Win2000- Masquer le texte des messages précédents -


- Afficher le texte des messages précédents -


Oops sorry I meant the "a" character.
I want to keep the rows with numbers (like 1,2, 56) and those with
"a" (3a, 67a) and not the others
T2net- Hide quoted text -

- Show quoted text -