I'm trying to enter a formula using a macro, and normally this works just fine, but for some reason excel hates me today. I know it has something to do with a quote missing or extra somewhere along the line, but there are a lot of quotes. I could use a second set of eyes!
Range("C2").FormulaR1C1 = "=""INSERT INTO Table1 VALUES('""&""UPPER(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(RC[-2],"""" "",""""),"","",""""),""."",""""),""-"",""""),""_"",""""),""/"",""""),""("",""""),"")"",""""),""&"",""""),""^"",""""),""%"",""""),""),""]"",""""),"":"",""""),"";"",""""),""#"",""""),""@"",""""),""$"",""""),"""""""",""""),""|"",""""))"""
The purpose of the macro is to generate a ton of SQL Queries for me. So it will convert:
This is a "string", of text-with stuff's
Into
INSERT INTO Table1 VALUES('THISISASTRINGOFTEXTWITHSTUFFS')
Thanks.
Bookmarks