I have a macro that formats a set of data. Part of it is that I this line:
ActiveCell.FormulaR1C1 = "=MID(B4,FIND(" - ",B4)+1,LEN(B4))"
The problem is, I don't want a space before and after the hyphen. When I take it out and save, it puts the spaces back in and it's driving me insane. How can I get it to just type the formula I want? With the spaces in there, it breaks the macro, and I have to debug. It used to work, but I changed the formula, then realized the new formula didn't work, so I went back to this one (which works when I test it - but only WITHOUT the spaces. HELP!
What it does is it removes the prefix on thousands of skus. So the Sku is KNT-154354. The formula finds the dash, and then gives me everything after the first dash (sometimes there are other dashes and things after the dash.
Help?
ActiveCell.FormulaR1C1 = "=MID(B4,FIND(" - ",B4)+1,LEN(B4))"
The problem is, I don't want a space before and after the hyphen. When I take it out and save, it puts the spaces back in and it's driving me insane. How can I get it to just type the formula I want? With the spaces in there, it breaks the macro, and I have to debug. It used to work, but I changed the formula, then realized the new formula didn't work, so I went back to this one (which works when I test it - but only WITHOUT the spaces. HELP!
What it does is it removes the prefix on thousands of skus. So the Sku is KNT-154354. The formula finds the dash, and then gives me everything after the first dash (sometimes there are other dashes and things after the dash.
Help?