Skip to playerSkip to main content
  • 2 years ago
MIS Interview Series Q30 VBA UDF Function

Function Value_with_hypen(x As String)

find_hypen = InStr(x, "-")
first_value = Left(x, find_hypen - 1) + 0
second_value = Right(x, Len(x) - find_hypen) + 0
For i = first_value To second_value

qq = qq & "," & i
Next i
Value_with_hypen = Right(qq, Len(qq) - 1)

End Function

Supporting file can be downloaded from below path.
https://drive.google.com/file/d/1d60yBUh2Rhr5PVE7Fm2gPBl69fDH5yHQ/view?usp=sharing

Microsoft Excel Course: Advanced Excel Training

https://www.udemy.com/course/microsoft-excel-excel-from-beginner-to-advanced-m/?couponCode=FC0D30F148B3045E6E59
Be the first to comment
Add your comment

Recommended