Buscar en baso a dos o mas criterios VBA
Publicado por Pool (6 intervenciones) el 16/08/2017 02:00:27
Hola buenas tardes, me pueden ayudar con la sig. linea de codigo lo que estoy buscando hacer es Buscar registros en vase a 2 o mas criterios actualmente tengo este codigo con el que busco en base a un criterio pero no se como modificarlo para que pueda buscar con mas criterios espero puedan ayudarme gracias........
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Private Sub B_Buscar_Click()
On Error Resume Next
Text_Denominaciondistintiva.Text = WorksheetFunction.VLookup(Val((Text_Codigo.Text) And (C_Estatus.Text)), Sheets("Productos").Range("B6:T1505"), 3, False)
C_Laboratorio.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text And C_Estatus.Text), Sheets("Productos").Range("B6:T1505"), 4, False)
Text_RegistroSanitario.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text), Sheets("Productos").Range("B6:T1505"), 5, False)
C_Forma.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text), Sheets("Productos").Range("B6:T1505"), 6, False)
C_Administracion.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text), Sheets("Productos").Range("B6:T1505"), 7, False)
Text_Presentacion.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text), Sheets("Productos").Range("B6:T1505"), 8, False)
Text_Precio.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text), Sheets("Productos").Range("B6:T1505"), 9, False)
Text_cualitativa.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text), Sheets("Productos").Range("B6:T1505"), 10, False)
Text_Cuantitativa.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text), Sheets("Productos").Range("B6:T1505"), 11, False)
Text_Excipiente.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text), Sheets("Productos").Range("B6:T1505"), 12, False)
C_Temperatura.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text), Sheets("Productos").Range("B6:T1505"), 13, False)
C_Humedad.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text), Sheets("Productos").Range("B6:T1505"), 14, False)
C_Luz.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text), Sheets("Productos").Range("B6:T1505"), 15, False)
C_Clasificacion.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text), Sheets("Productos").Range("B6:T1505"), 16, False)
C_Controles.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text), Sheets("Productos").Range("B6:T1505"), 17, False)
C_Grupo.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text), Sheets("Productos").Range("B6:T1505"), 18, False)
C_Subgrupo.Text = WorksheetFunction.VLookup(Val(Text_Codigo.Text), Sheets("Productos").Range("B6:T1505"), 19, False)
B_Editar.Enabled = True
End Sub
Valora esta pregunta


0