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.

Formula cambia minúsculas por mayúsculas y viceversa

publicado

Buenos días a tod@s!!!

Necesito una formula que tooglee las minúsculas por mayúsculas, y mayúsculas por minúsculas. Que, por ejemplo, el valor MMMaaa pase a mmmAAA

Ejemplos:

de / a

image.png.b0dc3a23be7f5fdd0f636fd2d80daad3.png

Por el momento tengo una formula que funciona, pero está un poco rebuscada, y estoy casi seguro puede haber una forma más eficiente.

 

image.thumb.png.6bc9d4099a1d6e371cb3395394dbf18e.png

Esta formula tooglea las minúsculas y mayúsculas del valor de la celda A1:

=SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(MINUSC(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(SUSTITUIR(A1;"a";"AA--==");"b";"BB--==");"c";"CC--==");"d";"DD--==");"e";"EE--==");"f";"FF--==");"g";"GG--==");"h";"HH--==");"i";"II--==");"j";"JJ--==");"k";"KK--==");"l";"LL--==");"m";"MM--==");"n";"NN--==");"ñ";"ÑÑ--==");"o";"OO--==");"p";"PP--==");"q";"QQ--==");"r";"RR--==");"s";"SS--==");"t";"TT--==");"u";"UU--==");"v";"VV--==");"w";"WW--==");"x";"XX--==");"y";"YY--==");"z";"ZZ--=="));"aa--==";"A");"bb--==";"B");"cc--==";"C");"dd--==";"D");"ee--==";"E");"ff--==";"F");"gg--==";"G");"hh--==";"H");"ii--==";"I");"jj--==";"J");"kk--==";"K");"ll--==";"L");"mm--==";"M");"nn--==";"N");"ññ--==";"Ñ");"oo--==";"O");"pp--==";"P");"qq--==";"Q");"rr--==";"R");"ss--==";"S");"tt--==";"T");"uu--==";"U");"vv--==";"V");"ww--==";"W");"xx--==";"X");"yy--==";"Y");"zz--==";"Z")

 

Gracias!!!

 

 

Featured Replies

publicado

Lo que yo puedo aportar es que uses una función personalizada, inserta un módulo en tu libro y pega el siguiente código:

Function InvertirLetras(texto As String) As String
    Dim i As Integer
    Dim resultado As String
    Dim caracter As String

    For i = 1 To Len(texto)
        caracter = Mid(texto, i, 1)
        If caracter = UCase(caracter) Then
            resultado = resultado & LCase(caracter)
        Else
            resultado = resultado & UCase(caracter)
        End If
    Next i

    InvertirLetras = resultado
End Function

Saludines

publicado

Hola a ambos,

...y si te interesa con fórmula, puedes probar con:

=SUSTITUIR(MATRIZATEXTO(LET(a;CODIGO(EXTRAE(A1;SECUENCIA(LARGO(A1));1));SI(a=209;"ñ";SI(a<91;CARACTER(a+32);CARACTER(a-32)))));"; ";"")

Veo que dispones de M365, así que no tendrás problemas.

Saludos,

publicado
  • Autor

Impresionante, muchas gracias a los 2!!! dejo anotada la funcion por VBA, y sobre la funcion de Victor, me funciono perfectamente! olvidé comentar que el valor podría tener números, en ese caso la formula toma esos numeros como codigo de caracteres y los convierte, pero! gracias a esa formula pude pensar una donde tenga en cuenta los números y los deje intactos:

=SI.ERROR(UNIRCADENAS("";;CARACTER(BYROW(CODIGO(EXTRAE(A1;SECUENCIA(LARGO(A1));1));LAMBDA(c;SI.CONJUNTO(O(c=241;Y(c>96;c<123));c-32;O(c=209;Y(c>64;c<91));c+32;VERDADERO;c)))));"")

image.thumb.png.43abb1f99fb6842dcb62eb9a48064b4a.png

Muchas gracias por su ayuda!!!

publicado

¡Saludos a todos!

Dejo esta opción, @Logafo, usando la función MAP con LAMBDA en las 3 celdas directamente:

=MAP(A1:A3;LAMBDA(x;LET(c;CODIGO(EXTRAE(x;SECUENCIA(LARGO(x));1));CONCAT(CARACTER(c+SI(c>64;32*-1^(c>90)))))))

¡Bendiciones!

publicado

Hola a todos,

Otra opción:

=CONCAT(LET(x,A1,s,SECUENCIA(LARGO(x)),e,EXTRAE(x,s,1),m,MAYUSC(e),SI(IGUAL(e,m),MINUSC(e),m)))

imagen.png.c6622bf2620858f3152ce856e801aaf7.png

 

=MAP(A1:A5,LAMBDA(x,CONCAT(LET(s,SECUENCIA(LARGO(x)),e,EXTRAE(x,s,1),m,MAYUSC(e),SI(IGUAL(e,m),MINUSC(e),m)))))

 

publicado

Hola @John Jairo V

Cierto, se puede acortar, ya que la variable "s" se usa una sola vez se puede omitir y anidarla dentro de la función:

 

=CONCAT(LET(x,A1,s,SECUENCIA(LARGO(x)),e,EXTRAE(x,s,1),
m,MAYUSC(e),SI(IGUAL(e,m),MINUSC(e),m)))


=CONCAT(LET(x,A1),e,EXTRAE(x,SECUENCIA(LARGO(x)),1),
m,MAYUSC(e),SI(IGUAL(e,m),MINUSC(e),m)))


A partir de la anterior se pueden agregar las funciones MAP y LAMBDA si se quiere usar como matriz dinámica,

o se deja tal cual si se usa dentro de una tabla.

 

Saludos

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.