Todd Bardoni
Well-known Member
- Joined
- Aug 29, 2002
- Messages
- 3,042
A post of this nature from not too long ago:
http://www.mrexcel.com/board2/viewtopic.php?p=1112255#1112255
I rather liked my solution and can be adapted for strings up to 256 characters.
Edit:-
Here it is adapted for 256 characters:
Named Formula:-
str_ReversTxt (entered in A1:IV1 with ctrl/shift/enter):- =LEFT(RIGHT(Formulas!$A$3,COLUMN(Formulas!1:$256)),1)
A3:- =Output!A2
A5:- =$A$1&$B$1&$C$1...etc
A6:- =$DH$1&$DI$1&$DJ$1...etc
I wrote a macro to write the last two concat formulas above...
str_Output:- =LEFT(Formulas!A5&Formulas!A6,LEN(Output!$A$2))
http://www.mrexcel.com/board2/viewtopic.php?p=1112255#1112255
I rather liked my solution and can be adapted for strings up to 256 characters.
Edit:-
Here it is adapted for 256 characters:
Named Formula:-
str_ReversTxt (entered in A1:IV1 with ctrl/shift/enter):- =LEFT(RIGHT(Formulas!$A$3,COLUMN(Formulas!1:$256)),1)
A3:- =Output!A2
A5:- =$A$1&$B$1&$C$1...etc
A6:- =$DH$1&$DI$1&$DJ$1...etc
I wrote a macro to write the last two concat formulas above...
Code:
Sub CreateConcatFormu()
For x = 1 To 111
t = Cells(1, x).Address
i = i & t & "&"
Next x
Range("a5") = "=" & Left(i, Len(i) - 1)
t = ""
i = ""
For x = 112 To 256
t = Cells(1, x).Address
i = i & t & "&"
Next x
Range("a6") = "=" & Left(i, Len(i) - 1)
End Sub
Book1.xls | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | InputString | OutputString | ||||
2 | HelloWorld | dlroWolleH | ||||
Output |
str_Output:- =LEFT(Formulas!A5&Formulas!A6,LEN(Output!$A$2))