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.

Separar apellidos y nombres

publicado

Buenas tardes expertos, por favor si me pueden ayudar tengo un archivo que necesito separar los apellidos y nombres, pero en mi base de datos tengo a algunos datos de las personas solo un apellido y un nombre en eso me debe salir el mensaje "No tiene Ap Materno" y en el resto normal lo debe separar. Adjunto el archivo.

Muchas gracias por su tiempo y ayuda.

Separar apellidos y nombre.xlsx

Featured Replies

publicado

Estimado,

Quizás una macro le puede servir, adjunto una para que la revise

(En la planilla adjunta sólo debes presionar el botón)

 

Sub Macro1()
'
' Macro1 Macro
'
A = 1
While Range(Cells(A, 1), Cells(A, 1)) <> ""
    A = A + 1
Wend
A = A - 1

For i = 2 To A
    APM = ""
    AP = ""
    NN = ""
    ESP = ""

    AA = Range(Cells(i, 1), Cells(i, 1))
    LAA = Len(AA)
    Position1 = InStr(AA, ",") 'Posición del Texto de Inicio
    AP = Mid(AA, 1, Position1 - 1)
    LAP = Len(AP)
    ESP = InStr(AP, " ")
    If ESP <> 0 Then
        APM = Mid(AP, ESP + 1, LAP)
        AP = Mid(AP, 1, ESP - 1)
        Range(Cells(i, 3), Cells(i, 3)) = APM
        Else
        Range(Cells(i, 3), Cells(i, 3)) = "No tiene Ap Materno"
    End If
    NN = Mid(AA, Position1 + 2, LAA)
    Range(Cells(i, 2), Cells(i, 2)) = AP
    Range(Cells(i, 4), Cells(i, 4)) = NN
    
Next i

End Sub

Separar apellidos y nombre.xlsm

publicado
  • Autor

afigueroaf, excelente funciona perfecto se lo agradezco

publicado
  • Autor

GabrielRiojosa, muchas gracias muy buen aporte justo lo que necesitaba

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.