Hi All,
Please help to concatenate the two column values into other column. I have used below function but only one UIN (column name) is appearing in column Y of Reporting Structure. Need to bring two column value, first value from column W of Line Manager UIN and followed by column A of UIN.
In excel i have done with this formula i.e. =CONCATENATE("x:",[@[Line Manager UIN]],":" & [@UIN]) which gives the result
x:802422055:600124663.
I am attaching the workbook(RSLM.xlsb) with the code in Module1 and also the output file (Output_RSLM.xlsb) which i need in column Y of Reporting Structure.
Any help is appreciated as this little urgent. Thanks in advance.
Please help to concatenate the two column values into other column. I have used below function but only one UIN (column name) is appearing in column Y of Reporting Structure. Need to bring two column value, first value from column W of Line Manager UIN and followed by column A of UIN.
In excel i have done with this formula i.e. =CONCATENATE("x:",[@[Line Manager UIN]],":" & [@UIN]) which gives the result
x:802422055:600124663.
I am attaching the workbook(RSLM.xlsb) with the code in Module1 and also the output file (Output_RSLM.xlsb) which i need in column Y of Reporting Structure.
Any help is appreciated as this little urgent. Thanks in advance.
Code:
Function ReportingStructure(UIN As String, UINRng As Range, LMUINRng As Range) As String
'=======================================================================================
Dim c As Variant
Dim LMUIN As String
Set c = UINRng.Find(What:=UIN, LookIn:=xlValues, LookAt:=xlWhole)
If c Is Nothing Then
ReportingStructure = "X:" & UIN
Else
LMUIN = Application.Intersect(c.EntireRow, LMUINRng).Value
ReportingStructure = ReportingStructure(LMUIN, UINRng, LMUINRng) & ":" & UIN
End If
End Function
Attachments
Last edited by a moderator: