Hi,
I am very new to VBA, hence the question is quite basic. However, after browsing forums, i could not tackle it myself. I was doing some modifications to the below part of a SUB.
It extracts information from one sheet as per the first row and should make the ''desired output''. I have the problem with syntax of text SEK, which is a constant. How do I correctly add it in the code, since the current syntax does not work? Thanks in advance
.Range("A1").FormulaR1C1 = "=TRIM('sheet1'!R[2]C[14])&"",""&TEXT(TODAY(),""ddmmyy"")&"",""&SEK&"",""&TEXT('sheet1'!R[2]C[7],""#.00000"")"
.Columns("A:A").ColumnWidth = 54.71
.Range("A1").AutoFill Destination:=Range("A1:A" & lngRows), Type:=xlFillDefault
.Columns(1).Copy
.Columns(1).PasteSpecial Paste:=xlPasteValues
Desired output:
SE0055762806,060319,SEK,99.999
SE0117623456,060319,SEK,98.111
SE0011957842,060319,SEK,100.089
etc.
I am very new to VBA, hence the question is quite basic. However, after browsing forums, i could not tackle it myself. I was doing some modifications to the below part of a SUB.
It extracts information from one sheet as per the first row and should make the ''desired output''. I have the problem with syntax of text SEK, which is a constant. How do I correctly add it in the code, since the current syntax does not work? Thanks in advance
.Range("A1").FormulaR1C1 = "=TRIM('sheet1'!R[2]C[14])&"",""&TEXT(TODAY(),""ddmmyy"")&"",""&SEK&"",""&TEXT('sheet1'!R[2]C[7],""#.00000"")"
.Columns("A:A").ColumnWidth = 54.71
.Range("A1").AutoFill Destination:=Range("A1:A" & lngRows), Type:=xlFillDefault
.Columns(1).Copy
.Columns(1).PasteSpecial Paste:=xlPasteValues
Desired output:
SE0055762806,060319,SEK,99.999
SE0117623456,060319,SEK,98.111
SE0011957842,060319,SEK,100.089
etc.