goofy code

The other day I needed to increment some footnotes for a document that gets published yearly. The footnotes look something like:

(8,11)

I needed to increment them all by three and there are a few pages, so of course I wrote some VBA. The line that prompted this post removes the left and right parentheses, then Splits the remaining string with comma as the delimiter, and assigns the resulting array to a variant. Here it is:

 SplitCell = Split(Replace(Replace(cell.Value2, ")", ""), "(", ""), ",")

I admit I’m easily amused, but that is some funny looking code.

Speak Your Mind

Your email address will not be published. Required fields are marked *

To post code, do this: <code> your vba here </code>