Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

270
Vistas
VBA how to find the last empty cell after an active 1

I want to fill in the time in the next empty cell , but the fucntion End(xlUp) takes me to the last active cell , and the End(xlDown) takes me to the last cell of the chart.

What do I do? Please help me

Here's the code I wrote to find the last cell of column "F" .

Function insertTime()

Range("F").End (xlUp)  = Now()

End Function

example image

about 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

If your sheet is empty then it will take to last row. If you have data in F Column then it will take to the last cell. Try below codes

Sub insertTime()
    Cells(Rows.Count, "F").End(xlUp).Offset(1, 0) = Now()
End Sub
about 4 years ago · Santiago Trujillo Denunciar

0

Offset() to the rescue: where-ever you are, you can use Offset() to move one cell to the left (Offset(0,-1)), to the right (Offset(0,1)), up (Offset(-1,0)) or down (Offset(1,0)), and obviously you can use other numbers: Offset(1,2), Offset(2,-1), ... are ways to jump around like a horse on a chessboard :-)

For your application, I believe that this (or a similar one) might help you:

Go up and to the right:

Range("F:F").End (xlUp).Offset(0,1)  = Now()

Go down and one deeper:

Range("F1").End (xlDown).Offset(1,0)  = Now()

...

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda