1. pencarian dengan menggunakan textbox1 dan di tampilkan di textbox lain
Private Sub TextBox1_Change()
Set Macro = Sheets("Sheet1")
On Error Resume Next
Set EditMacro = Macro.Range("A3Kebawah")
Set c = EditMacro.Find(TextBox1.Value, _
LookIn:=xlValues)
TextBox2.Value = c.Offset(0, 1).Value
TextBox3.Value = c.Offset(0, 2).Value
TextBox4.Value = c.Offset(0, 3).Value
End Sub
2. Pencarian bagian 2
Input data berdasarkan kolom pencarian 1
Dim Kode
Dim CellTujuan As Range
Kode = TextBox1.Value
Set CellTujuan = Range("C3:ZZ3").Find(What:=Kode,
LookIn:=xlValues, LookAt:=xlWhole)
If Not CellTujuan Is Nothing Then
TextBox2 = Cells(4, CellTujuan.Column)
End If
3. Pencarian bagian 3
Dim x As Range
For Each x In Range("A1:Z100")
If x.Value = CStr(TextBox1.Value) Then
TextBox2.Value = x.Offset(1, 0).Value
End If
Next
4. pencarian pada 3 sheet
Mencari data 3 sheet
Private Sub TextBox2_Change()
Dim i As integer
For i = 1 to 3
Set IpAoNE = Sheets("Sheet"&i)
Set IdRangeA = IpAoNE.Range("B3:B8")
Set c = IdRangeA.Find(TextBox1.Value,
LookIn:=xlValues)
TextBox2.Value = c.Offset(0, 1).Value
TextBox3.Value = c.Offset(0, 2).Value
Next i
End Sub
28.04.2017
*********(((
PENGEMBANGN
3 sheet
Bulanjanuari, bulanpebruari, Bulanmei
Dim i As integer
Dim 1, 2, 3
1 = Januari
2 = pebruari
3 = maret
For i = 1 to 3
Set IpAoNE = Sheets("bulan"&i)
Set IdRangeA = IpAoNE.Range("B3:B8")
Set c = IdRangeA.Find(TextBox2.Value,
LookIn:=xlValues, _
MatchCase:=False)
TextBox1.Value = c.Offset(0, -1).Value
TextBox3.Value = c.Offset(0, 1).Value
Next i
End Sub