Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Insertar fechas faltantes en varios intervalos.

publicado

Hola:

Imagina que en B1 y B2 escribo dos fechas: 01/01/2014 y 01/05/2014, y al ejecutar una macro me inserta en A las fechas que faltan entre ambas, incluídas las anteriores, es decir: 01/01, 02/01,... 05/01).

Ahora escribo en B3 y B4 otro par, vuelve a ejecutar y me inserta las faltantes a continuación de las anteriores.

Lo que pretendo es, de un solo golpe, insertar varias fechas en la columna B y me inserte en A todas las que faltan entre cada una de ellas. Os pongo el resultado en la hoja 2 del archivo.

Saludos.

Fechas.rar

Featured Replies

publicado

Pues ahí va.


Sub CompletarFechas()

Sheets("Sheet2").Select
Columns(1).ClearContents
fila = 2
For x = 2 To Range("B" & Rows.Count).End(xlUp).Row Step 2
For fecha = Range("B" & x) To Range("B" & x + 1)
Range("A" & fila) = fecha
fila = fila + 1
Next
Next
[A1] = "FECHA"

End Sub

[/CODE]

publicado
  • Autor

Perfecto, y muchas gracias.

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.