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.

Ayuda con una macro para no repetir el mismo dia del trabajador

publicado

Buenas tardes, expertos nuevamente los solicito su ayuda habra una macro donde me permita rechazar cuando coloque X en una celda en la fila que se repita el trabajador sea de dia o noche (el trabajador debe trabajar un solo turno sea de dia o noche pero no ambos) . Por favor si hubiera una forma me pueden ayudar estare agradecido .

Ajunto una pequeña base de datos donde necesito la demostración de la macro.

VALORIZACION CONSTRUCCION ENERO - FEBRERO 22.xlsm

Featured Replies

publicado

Prueba con esta macro:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.CountLarge = 1 Then
   If Not Intersect(Target, Range("C:AG")) Is Nothing Then
      If Range("B" & Target.Row) = "DIA" Or Range("B" & Target.Row) = "NOCHE" Then
         If Not Range("A" & Target.Row) = "" Then
            Set nombre = Columns("A").Find(What:=Range("A" & Target.Row).Value, _
                                           After:=Range("A" & Target.Row), _
                                           LookAt:=xlWhole)
            If Not nombre Is Nothing Then
               If UCase(Target) = "X" And UCase(Cells(nombre.Row, Target.Column)) = "X" Then
                  MsgBox "Turno ya asignado en fila " & nombre.Row, vbCritical
                  Target = ""
                  Target.Select
               End If
            End If
         End If
      End If
   End If
End If
End Sub

 

publicado
  • Autor

Antoni, muchas gracias funciona perfecto te lo agradezco un monton eres un genio

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.