Sorry for the Excel question in an Access forum.......... .........I don't see an Excel forum and there's probably a reason for that but figured I'd give this a shot anyway. Again sorry, delete if necessary.
I'm adding an apostrophe into the cell value using a loop, but with 40k rows of data it takes 5 minutes.
If my cell value is ABC, the new value becomes 'ABC and cell value length = 3.
I tried using a cell formula which takes 1 minute.
' ActiveCell.Form ulaR1C1 = "=""'""&A1"
If my cell value is ABC, the new value becomes 'ABC and cell value length = 4.
I need the cell value length to = 3 but would prefer to use the formula instead of the loop to save time.
Any suggestions?
I'm adding an apostrophe into the cell value using a loop, but with 40k rows of data it takes 5 minutes.
Code:
' For iCol = 1 To 8 ' For lCtr = 2 To lLastRow ' Cells(lCtr, iCol).Select ' sValue = Selection.Value ' If Left(sValue, 1) <> "'" Then ' sValue = "'" & sValue ' Selection.Value = sValue ' End If ' Next ' Next
I tried using a cell formula which takes 1 minute.
' ActiveCell.Form ulaR1C1 = "=""'""&A1"
If my cell value is ABC, the new value becomes 'ABC and cell value length = 4.
I need the cell value length to = 3 but would prefer to use the formula instead of the loop to save time.
Any suggestions?
Comment