Friday, August 31, 2012

How to Extract Search Item from a Column and Move to Desired Column in Excel with VBA

VBA Macro to Pull Out Search Item From a Column and Move to a Desired Column in Excel
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

Thanks,Tamatam

No comments:

Post a Comment

Hi User, Thank You for visiting My Blog. Please post your genuine Feedback or comments only related to this Blog Posts. Please do not post any Spam comments or Advertising kind of comments which will be Ignored.

Featured Post from this Blog

How to compare Current Snapshot Data with Previous Snapshot in Power BI

How to Dynamically compare two Snapshots Data in Power BI Scenario: Suppose, we have a sample Sales data, which is stored with Monthly Snaps...

Popular Posts from this Blog