I'm a complete rookie when it comes to VBA but am fairly experienced with excel. I know the nature of the argument I want to make but am not very good with syntax in VBA
Here's what i want to do, all of the cells in range I:I contain text. The text in many of these cells begins with "(x)" where x is a 1-5 digit number. I want to erase such occurrences. It is possible that some of the text strings will not start with bracketed numbers but will have text in brackets elsewhere in the string. It is also possible that both bracketed occurrences will occur: the text string begins with "(x)" and has other text in brackets later in the string.
Because I don't want to replace text within brackets that's later in the string and since it is possible this will be the first occurrence of text within brackets, I can't simply use replace "(x)" even if I limited it to the first occoruance of "(x)".
The solution I thought of, if I were writing this as a formula in another cell, is
=IF(FIND(")",I581)<=7,RIGHT(I1,LEN(I1)-FIND(")",I1)),I1)
The idea behind this is that in the cases I want to remove the brackets and text, the first occurrence of the right bracket ")" will always be the 7th character or less. I would like to achieve this result to the entire range using a macro.
Thanks
Bookmarks