Hi all,
I have a form in which I want to convert a string into a series of single characters and paste each single charcter into progressive columns in the same row.
So I have a string called DimString with a value of Christyxo
and the code I have so far does this;
Sheets("Sheet1").Range("D32").FormulaR1C1 = Left(DimString, 1)
Sheets("Sheet1").Range("E32").FormulaR1C1 = Left(Right(DimString, 8), 1)
Sheets("Sheet1").Range("F32").FormulaR1C1 = Left(Right(DimString, 7), 1)
Sheets("Sheet1").Range("G32").FormulaR1C1 = Left(Right(DimString, 6), 1)
Sheets("Sheet1").Range("H32").FormulaR1C1 = Left(Right(DimString, 5), 1)
Sheets("Sheet1").Range("I32").FormulaR1C1 = Left(Right(DimString, 4), 1)
Sheets("Sheet1").Range("J32").FormulaR1C1 = Left(Right(DimString, 3), 1)
Sheets("Sheet1").Range("J32").FormulaR1C1 = Left(Right(DimString, 2), 1)
Sheets("Sheet1").Range("K32").FormulaR1C1 = Right(DimString, 1)
Easy enough.
The problem is that this would only work if the string is 9 characters long.
Is there anything I can do to tidy this up so that it works correctly for any string up to 30 characters in length?
Thanks in advance of any help