Click here to edit title

lets learn together

Download

Macro

Posted by [email protected] on May 7, 2015 at 11:45 AM

Sub ListDownName()

i = 1

For Each sh In ActiveWorkbook.Worksheets

Range("A" & i).Value = sh.Name

i = i + 1

Next

End Sub

 

Sub Browsefileand_listdowntheirname()

 

With Application.FileDialog(msoFileDialogOpen)

.AllowMultiSelect = True

.Show

For i = 1 To .SelectedItems.Count

yy = .SelectedItems(i)

Range("B" & i).Value = Extractfilename(yy)

Next

 

End With

End Sub

 

 

Function Extractfilename(url As Variant) As String

x = 0

For i = 1 To Len(url)

If Mid(url, i, 1) = "\" Then

x = x + 1

End If

Next

n = Application.WorksheetFunction.Substitute(url, "\", "@", x)

m = Application.WorksheetFunction.Search("@", n) + 1

Extractfilename = Trim(Mid(url, m, Len(url)))

End Function

 

 

Sub Filtereddata()

Dim rng As Range

Set rng = Sheet1.Range("A1").CurrentRegion

x = InputBox("Enter the name to whom you want to filter")

rng.AutoFilter Field:=1, Criteria1:=x

Cells.SpecialCells(xlCellTypeVisible).Copy Destination:=Sheet2.Range("A1")

End Sub

 

Sub conversiontexttovalue()

For Each cell In Range("A1").CurrentRegion

cell.Select

If cell = WorksheetFunction.IsText(cell) Then

cell.Value = Val(cell)

End If

Next

End Sub

 

Categories: None

Post a Comment

Oops!

Oops, you forgot something.

Oops!

The words you entered did not match the given text. Please try again.

Already a member? Sign In

0 Comments