![]() |
Macro for Trimming
Hello All,
Please help me to trim a file with more than 1000 email Ids. It is in the below form xxxxx from the above mentioned form I should get only the perfect email Id. (i.e) xxxxx = Please help me to build this Macro. It will be very helpful for me. Thanx in Advance. Madhan |
Macro for Trimming
Sub ReplaceMacro()
Cells.Replace What:="*<", Replacement:="", LookAt:=xlPart, SearchOrder _ :=xlByRows, MatchCase:=True, SearchFormat:=False, ReplaceFormat:=False Cells.Replace What:="", Replacement:="", LookAt:=xlPart, SearchOrder:= _ xlByRows, MatchCase:=True, SearchFormat:=False, ReplaceFormat:=False End Sub HTH Die_Another_Day vmadan16 wrote: Hello All, Please help me to trim a file with more than 1000 email Ids. It is in the below form xxxxx from the above mentioned form I should get only the perfect email Id. (i.e) xxxxx = Please help me to build this Macro. It will be very helpful for me. Thanx in Advance. Madhan |
Macro for Trimming
I am not sure if you really need a macro for this.
If your data is in column A, put this in cell B1 and extend the formula all the way down column B =MID(A1,FIND("<",A1)+1,LEN(A1)-FIND("<",A1)-1) Hope that helps you! -- Allllen "vmadan16" wrote: Hello All, Please help me to trim a file with more than 1000 email Ids. It is in the below form xxxxx from the above mentioned form I should get only the perfect email Id. (i.e) xxxxx = Please help me to build this Macro. It will be very helpful for me. Thanx in Advance. Madhan |
Macro for Trimming
Change this:
=MID(A1,FIND("<",A1)+1,LEN(A1)-FIND("<",A1)-1) to this: =MID(A1,FIND("<",A1)+1,FIND("",A1)-FIND("<",A1)-1) HTH Die_Another_Day vmadan16 wrote: Hi Allllen, thanx a lot, It worked well. can One more thing added to that xxxxx = in the above case it worked well. one more thing can be added to that (i.e) xxxxx , = in this case that is If a comma(i.e more than one character) is there in front or at the end of the angular brackets it is not working is there any solution for this. If so pls let me know. thanx in advance. Madhan "Allllen" wrote: I am not sure if you really need a macro for this. If your data is in column A, put this in cell B1 and extend the formula all the way down column B =MID(A1,FIND("<",A1)+1,LEN(A1)-FIND("<",A1)-1) Hope that helps you! -- Allllen "vmadan16" wrote: Hello All, Please help me to trim a file with more than 1000 email Ids. It is in the below form xxxxx from the above mentioned form I should get only the perfect email Id. (i.e) xxxxx = Please help me to build this Macro. It will be very helpful for me. Thanx in Advance. Madhan |
All times are GMT +1. The time now is 04:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com