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.

Condicional Excel compartido

publicado

Buenas Tardes.

Me gustaría crear un formato condicional en un Excel pero al estar compartido no me da la opción de hacerlo.  Supongo que por programación se podrá hacerle.

La condición es referente a dos celdas, si la celda E2 esta rellena y la celda F2 está vacía que la fila 2 ponga el color de la fuente en naranja y la otra sería si la celda E2 esta rellena y la celda F2 está rellena que la fila 2 ponga el color de la fuente en rojo.

Muchas gracias por vuestra ayuda.

 

Featured Replies

publicado

sin más datos @juanmafdez, esto te debería servir
 

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address <> "$E$2" And Target.Address <> "$F$2" Then Exit Sub

Range("2:2").EntireRow.Font.ColorIndex = xlAutomatic

If [e2] <> "" And [f2] = "" Then
    Range("2:2").EntireRow.Font.Color = RGB(255, 153, 0)
ElseIf [e2] <> "" And [f2] <> "" Then
    Range("2:2").EntireRow.Font.Color = vbRed
End If

End Sub

 

publicado
  • Autor

Haplox muchas gracias por la respuesta.

Pero después de probar tu código solo me está cambiando el color en la fila 2, pero en la 3 o la 4 no lo cambia, supongo que es por el

Range("2:2").EntireRow.Font.ColorIndex = xlAutomatic

Por ejemplo si yo pongo en la posición e3 no se cambia de color se queda en Negro.

Muchas gracias.

 

publicado
Private Sub Worksheet_Change(ByVal Target As Range)
 
If Target.Column <> 5 And Target.Column <> 6 Then Exit Sub
 
Target.EntireRow.Font.ColorIndex = xlAutomatic
 
If Target.Column = 6 Then
    If Target.Offset(, -1) <> "" And Target = "" Then
        Target.EntireRow.Font.Color = RGB(255, 153, 0)
    ElseIf Target.Offset(, -1) <> "" And Target <> "" Then
        Target.EntireRow.Font.Color = vbRed
    End If
End If
 
If Target.Column = 5 Then
    If Target <> "" And Target.Offset(, 1) = "" Then
        Target.EntireRow.Font.Color = RGB(255, 153, 0)
    ElseIf Target <> "" And Target.Offset(, 1) <> "" Then
        Target.EntireRow.Font.Color = vbRed
    End If
End If
 
End Sub

Es que eso es lo que pedias :(. Prueba ahora

Private Sub Worksheet_Change(ByVal Target As Range)
 
If Target.Column <> 5 And Target.Column <> 6 Then Exit Sub
 
Target.EntireRow.Font.ColorIndex = xlAutomatic
 
If Target.Column = 6 Then
    If Target.Offset(, -1) <> "" And Target = "" Then
        Target.EntireRow.Font.Color = RGB(255, 153, 0)
    ElseIf Target.Offset(, -1) <> "" And Target <> "" Then
        Target.EntireRow.Font.Color = vbRed
    End If
End If
 
If Target.Column = 5 Then
    If Target <> "" And Target.Offset(, 1) = "" Then
        Target.EntireRow.Font.Color = RGB(255, 153, 0)
    ElseIf Target <> "" And Target.Offset(, 1) <> "" Then
        Target.EntireRow.Font.Color = vbRed
    End If
End If
 
End Sub

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.