Hello Team..
Found this on the Web...I have the following but i would Like to Modify It...
What I would Like to do is From the Value Of D3 on the Active Sheet, Find The Value from the Database Sheet which could be anywhere On the Database Sheet In Column B multiple times..
If Data is Found On the DataSheet Column B populate the values from C:H where to the Activesheet Range F:K (no Need to Add a New worksheet...) Just populate to the Active Sheet
Found this on the Web...I have the following but i would Like to Modify It...
VBA Code:
Sub Copy_To_Another_Sheet_1()
Dim FirstAddress As String
Dim MyArr As Variant
Dim Rng As Range
Dim Rcount As Long
Dim I As Long
Dim NewSh As Worksheet
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
'Fill in the search Value
MyArr = Range("D3").Text
'You can also use more values in the Array
'myArr = Array("@", "www")
'Add new worksheet to your workbook to copy to
'You can also use a existing sheet like this
'Set NewSh = Sheets("Sheet2")
Set NewSh = Worksheets.Add
With ActiveSheet.Range("F3:K100")
Rcount = 0
For I = LBound(MyArr) To UBound(MyArr)
'If you use LookIn:=xlValues it will also work with a
'formula cell that evaluates to "@"
'Note : I use xlPart in this example and not xlWhole
Set Rng = .Find(What:=MyArr(I), _
After:=.Cells(.Cells.Count), _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
FirstAddress = Rng.Address
Do
Rcount = Rcount + 1
Rng.Copy NewSh.Range("A" & Rcount)
' Use this if you only want to copy the value
' NewSh.Range("A" & Rcount).Value = Rng.Value
Set Rng = .FindNext(Rng)
Loop While Not Rng Is Nothing And Rng.Address <> FirstAddress
End If
Next I
End With
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub
What I would Like to do is From the Value Of D3 on the Active Sheet, Find The Value from the Database Sheet which could be anywhere On the Database Sheet In Column B multiple times..
If Data is Found On the DataSheet Column B populate the values from C:H where to the Activesheet Range F:K (no Need to Add a New worksheet...) Just populate to the Active Sheet