Friday, 31 August 2012

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


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


Sub SearchMultipleCol()
Dim x As Integer
Dim Y As Integer
Dim Z As Integer
Dim A As Integer
Dim c As String

c = InputBox("Enter Search String")
Z = InputBox("Enter Results Column No.")

For Y = 1 To 5

For x = 1 To 100
If InStr(LCase(Cells(x, Y)), LCase(c)) Then

A = A + 1
Cells(A, Z) = Cells(x, Y)

End If

Next x
Next Y

End Sub

No comments:

Post a Comment

Follow Me by Email

ExcelKingdom-Popular Posts

ExcelKingdom-Random Posts