I have the following procedure:
Sub Concat() Dim lRow As Long
lRow = Range("F" & Rows.count).End(xlUp).Row
For i = 2 To lRow
Cells(i, 10) = Cells(i, 6) & Cells(i, 8)
Function ColumnLetter(ColumnNumber As Long) As String
Dim n As Long
Dim c As Byte
Dim s As String
n = ColumnNumber
c = ((n - 1) Mod 26)
s = Chr(c + 65) & s
n = (n - c) \ 26
Loop While n > 0
ColumnLetter = s
I would like to re-adapt it by adding the following requirement:
1-Add an inputbox asking "In which column letter do you want to loop the concatenation?""F" in my procedure case. Checking if the value reported is not equal to a letter stop the program + msgbox the column reported is not valid.
2-Add an inputbox asking "Report your destination column in which you want to report your concatenation?" in my code case it is equal to "10" however it should be great to be able to report the column Letter. Checking if the value is not equal to a letter stop the program + msgbox the column reported is not valid.
3-Add an inputbox asking "Report the Columns letters that you want to concatenate"
Here is the tricky thing: In my procedure I am just able to concatenate values of two columns it would be great to concatenate more that than 2: Ex: I report A:B:C:D (I don't know if the ":" is the best to report the concatenation), I should have the concatenation of the 4 columns in Destination column. If possible I should be able to report as match as concatenation columns as I want. If this is not possible I would like to have an option to concatenate 2, 3 up to 4 columns.
Thank you again for your help.