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.
publicado

Buenas tardes, pretendo ocultar las celdas AF8:AF10, o que el texto resulte del mismo color que el fondo, en el mes de febrero de los años no bisiestos.
He intentado esto... pero me da error. ¿Me podéis orientar?

 

Sub VerificarAnioBisiesto()
    Dim año As Integer
    
    ' Asignar el valor de la celda B2 a la variable año
    año = Range("B2").Value
    
    ' Comprobar si el año es bisiesto
    If (año Mod 4 = 0 And año Mod 100 <> 0) Or (año Mod 400 = 0) Then
        ' Hacer visibles CELDAS
        Range("AF8:AF10").EntireColumn.Hidden = False
    Else
        ' Si no es bisiesto, ocultar CELDAS
        Range("AF8:AF10").Fuente.Color = RGB(255, 255, 255)
    End If
End Sub

 

Libro1.xlsm

Solucionado por Maku

Ir a la solución

Featured Replies

publicado
  • Autor

Aunque bien mirado... no sé si sería suficiente con igualar el color del texto al fondo.
¿Hay más opciones?

image.thumb.png.73086c7dd948fd8c7b23c2566c8f237f.png

Crear una cuenta o conéctate para comentar

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.