Hola @RubenDario
Faltaría que en cada línea dentro del With le pongas un punto al inicio
With Hoja1
.Range("B6:B18,F6:F18,J6:J18").Select
.Range("J6").Activate
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
.Selection.ClearContents
.Range("A1").Select
End With
Sin embargo, lo que yo haría (si fuese mi proyecto)... te ofrezco varias soluciones.
No asignarlo a una combinación de teclas, mejor ponerlo en una forma o botón.
Modificar tu libro con la app Custom UI Editor o similar y adicionar un botón en el Ribbon, estará visible solo cuando el libro esté activo.
Al principio de tu código pondría algo como: If Thisworkbook.Name <> ActiveWorkbook.Name Then Exit sub
Por
DiegoPC, · 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
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!!!