Dear All master,
if i use the code below after select range in column a then the results appear in column b and i want after column b the desired results appear in column c. Please solve
thanks
roykana
if i use the code below after select range in column a then the results appear in column b and i want after column b the desired results appear in column c. Please solve
thanks
roykana
VBA Code:
Sub GetFileNamebykana()
Dim title As String
Dim Rng As Range
Dim selection As Range
Dim splitpath As Variant
On Error Resume Next
title = "VBA by kana"
Set selection = Application.selection
Set selection = Application.InputBox("Range", title, selection.Address, Type:=8)
For Each Rng In selection
splitpath = VBA.Split(Rng.Value, "\")
Rng.Offset(0, 1).Value = splitpath(UBound(splitpath, 1))
Next
End Sub