EXPORTAR Datos de una hoja a otra con condición o criterio
Tengo un código que tal ves me ayden a modificar o adaptar a m archivo, es una macro
Sub transferirDatosOtraHoja()
Dim titulo As String
Dim auto As String
Dim year As Integer
Dim pais As String
Dim idioma As String
Dim genero As String
Dim ultimaFila As Long
Dim ultimaFilaAuxiliar As Long
Dim cont As Long
Dim palabraBusqueda As String
palabraBusqueda = Sheets("EEE").Cells(3, 6)
palabraBusqueda = "*" & palabraBusqueda & "*"
ultimaFila = Sheets("EEE").Range("B" & Rows.Count).End(xlUp).Row
If ultimaFila < 6 Then
Exit Sub
End If
For cont = 6 To ultimaFila
If Sheets("EEE").Cells(cont, 5) Like palabraBusqueda Then
HABITACION = Sheets("EEE").Cells(cont, 2)
TIPO = Sheets("EEE").Cells(cont, 3)
ESTADO = Sheets("EEE").Cells(cont, 4)
ADULTO = Sheets("EEE").Cells(cont, 5)
NIÑOS = Sheets("EEE").Cells(cont, 6)
Total = Sheets("EEE").Cells(cont, 7)
ultimaFilaAuxiliar = Sheets("Auxiliar").Range("B" & Rows.Count).End(xlUp).Row
Sheets("Auxiliar").Cells(ultimaFilaAuxiliar + 1, 2) = HABITACION
Sheets("Auxiliar").Cells(ultimaFilaAuxiliar + 1, 3) = TIPO
Sheets("Auxiliar").Cells(ultimaFilaAuxiliar + 1, 4) = ESTADO
Sheets("Auxiliar").Cells(ultimaFilaAuxiliar + 1, 5) = ADULTO
Sheets("Auxiliar").Cells(ultimaFilaAuxiliar + 1, 6) = NIÑOS
Sheets("Auxiliar").Cells(ultimaFilaAuxiliar + 1, 7) = Total
End If
Next cont
ultimaFilaAuxiliar = Sheets("Auxiliar").Range("B" & Rows.Count).End(xlUp).Row
With Sheets("Auxiliar").Range("B6:G" & ultimaFilaAuxiliar).Font
.Name = "Arial"
.Size = 9
.Italic = True
End With
MsgBox "Proceso terminado", vbInformation, "Resultado"
End Sub