Re: $$Excel-Macros$$ Removing specific characters from strings of texts

2011-10-25 Thread Haseeb Avarakkan
Hello Zeunasc, You can also do it through Find/Replace command. Select the column, press Ctrl+H to bring Find/Replace command. Find What : *(hitcnt** Replace All with blank. Again; Find What : *0x** Replace All with blank. Note: There is a * after each Find item. HTH Haseeb -- --

Re: $$Excel-Macros$$ Removing specific characters from strings of texts

2011-10-24 Thread Sam Mathai Chacko
Let us break it in to parts. =IF(LEN(A1)<>LEN(SUBSTITUTE(UPPER(A1),"REMARK","")),A1,LEFT(A1,MIN(IF(ISERROR(SEARCH(" 0x",A1)),255,SEARCH(" 0x",A1)),IF(ISERROR(SEARCH(" (h",A1)),255,SEARCH(" (h",A1) Assuming you know how an If function works *LEN(A1)<>LEN(SUBSTITUTE(UPPER(A1),"REMARK",""))*, r

Re: $$Excel-Macros$$ Removing specific characters from strings of texts

2011-10-24 Thread Zeunasc
You assumed correctly, and the resulting code works perfectly. Would it be too much to ask for an explanation of how this formula works? I understand parts of it, but I am trying to learn, instead of just ripping the code off. Again, thank you for this help! Z On Oct 24, 3:05 pm, Sam Mathai Cha

Re: $$Excel-Macros$$ Removing specific characters from strings of texts

2011-10-24 Thread Sam Mathai Chacko
No response. Had to assume. Here's the assumption as well as the file. =IF(LEN(A1)<>LEN(SUBSTITUTE(UPPER(A1),"REMARK","")),A1,LEFT(A1,MIN(IF(ISERROR(SEARCH(" 0x",A1)),255,SEARCH(" 0x",A1)),IF(ISERROR(SEARCH(" (h",A1)),255,SEARCH(" (h",A1) Regards, Sam Mathai Chacko (GL) On Tue, Oct 25, 2011

Re: $$Excel-Macros$$ Removing specific characters from strings of texts

2011-10-24 Thread Sam Mathai Chacko
so if the line has a remark in it, then leave it as it is, otherwise, remove anything that starts with (hitcnt or Ox? Sam On Tue, Oct 25, 2011 at 12:06 AM, Zeunasc wrote: > My apologies, I don't see how to attach a workbook to this post. > Below is some sample code, as would be contained in col

Re: $$Excel-Macros$$ Removing specific characters from strings of texts

2011-10-24 Thread Zeunasc
My apologies, I don't see how to attach a workbook to this post. Below is some sample code, as would be contained in column A. I tried to pick lines that would contain examples of all the different ways the data could be presented. No, there will not always be an eq 80. Best, I can tell, these ar

Re: $$Excel-Macros$$ Removing specific characters from strings of texts

2011-10-24 Thread Sam Mathai Chacko
So does that mean that all your lines will always have the eq 80 in it? If not, can you attach a sample workbook with a few more examples that clearly depicts the possible list in your complete set of data. Regards, Sam Mathai Chacko (GL) On Mon, Oct 24, 2011 at 11:33 PM, Zeunasc wrote: > You g

$$Excel-Macros$$ Removing specific characters from strings of texts

2011-10-24 Thread Zeunasc
You guys were such a help on the first part of this project, I thought I would ask another question. The project I am working on is still a review of firewall access-list lines. Quarterly, I have to review their use and purge the ones that haven't been used. That said, the output I get to review