publicado el 29 de noviembre1 año 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 Por el momento tengo una formula que funciona, pero está un poco rebuscada, y estoy casi seguro puede haber una forma más eficiente. 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!!!
publicado el 29 de noviembre1 año 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 el 29 de noviembre1 año 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 el 29 de noviembre1 año 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)))));"") Muchas gracias por su ayuda!!!
publicado el 29 de noviembre1 año ¡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 el 2 de diciembre1 año 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))) =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 el 2 de diciembre1 año Hola @John Jairo V Tu formula falla con la "Ñ" mayúscula de origen a minúscula de destino.
publicado el 2 de diciembre1 año Tienes razón @GabrielRaigosa. ¡Gracias por comentarlo! Entonces, puliendo un poco la forma que propones... dejo: =MAP(A1:A5;LAMBDA(x;LET(c;EXTRAE(x;SECUENCIA(LARGO(x));1);m;MINUSC(c);CONCAT(SI(IGUAL(c;m);MAYUSC(c);m))))) ¡Bendiciones!
publicado el 2 de diciembre1 año 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
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
Por el momento tengo una formula que funciona, pero está un poco rebuscada, y estoy casi seguro puede haber una forma más eficiente.
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!!!