Hi Dante … Just trying to understand your Evaluate line, what is the purpose of IF({1} & what does it mean ? I have tried to produce the same line without it as shown below & it works just fine with my small sample
Rich (BB code):This only works for the first cell .Value = Evaluate("=mid(" & .Address & ",1,len(" & .Address & ")-5)")
Thanks Dante for the feedback. I tried my code without the if({1} in the sample data provided above & it works for all rows not only the first row ... Anyway, i don't want to hijack this thread for something else. I will try to read more about it
Dante
It works for me without the If function.
I suspect that the Mid function effectively "returns the row number", in the same way the If function does.