Friday, 31 August 2012

Macro To Pull Out Search Item From A Column And Move To Desired Column

Macro To Pull Out Search Item From A Column  And Move To Desired Column

Sub SerchinCol()
Dim x As Integer
Dim Y As Integer
Dim Z As Integer
Dim B As Integer
Dim A As String
Dim d As String

B = 1
d = InputBox("Enter Your Name: ")
A = InputBox("Hai" & " " & d & " " & "Enter Your Serch Sring :")
Y = InputBox("Enter Serch Colno :")
Z = InputBox("Enter Serch Results Colno :")

Cells(1, Z) = " Serach Results "
Cells(1, Z).Font.Bold = True

For x = 1 To 100
If InStr(LCase(Cells(x, Y)), LCase(A)) Then
B = B + 1
Cells(B, Z) = Cells(x, Y)
End If

Next x
End Sub

No comments:

Post a Comment

Follow Me by Email

ExcelKingdom-Popular Posts

ExcelKingdom-Random Posts