Hi All,
Need to know how to add function or method in .xlam file and call that function from any excel file. Below is code which i am using. I have also attached the output file and .xlam.
I used below 2 function or method in xlam file but not able to call this. Please create the .xlam file as website not allowing me to attache this format.
I need below result in column Y with a combination of column W and A. Result X:802422055:600124663
Method 1:-
Method 2:-
Kindly help me as it is little urgent. Thanks in advance
Thank you!!
Warm Regards,
Amit Singh
--------------------------------------------------------------------------------------------
MOD EDIT: Added code tag
Need to know how to add function or method in .xlam file and call that function from any excel file. Below is code which i am using. I have also attached the output file and .xlam.
I used below 2 function or method in xlam file but not able to call this. Please create the .xlam file as website not allowing me to attache this format.
I need below result in column Y with a combination of column W and A. Result X:802422055:600124663
Method 1:-
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
Method 2:-
Code:
Sub ReportingStructure()
With Application
cm = .Calculation
.ScreenUpdating = False
.Calculation = xlCalculationManual
End With
With ActiveSheet
y = 2
Do
.Cells(y, 25) = "x:" & .Cells(y, 23) & ":" & .Cells(y, 1)
y = y + 1
Loop Until .Cells(y, 1) = Empty
.Range("Y1").Activate
End With
With Application
.Calculation = cm
.ScreenUpdating = True
End With
End Sub
Kindly help me as it is little urgent. Thanks in advance
Thank you!!
Warm Regards,
Amit Singh
--------------------------------------------------------------------------------------------
MOD EDIT: Added code tag
Attachments
Last edited by a moderator: