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.

Formato de todas las hojas abiertas en el mismo color

publicado

Hola a todos, mi nombre es Maurizio
Y mi problema es este: en un Modilo creé una función para formatear las líneas con colores a gusto.
Y esta es la función que utilicé:
-------------------------------------------------- -----------------------------------------------
Opción explícita
Dim X tan largo
Dim Y tan largo

Sub Ovale1_Click ()
Para X = 2 To Sheet1.Range ("A" & Rows.Count) .End (xlUp) .Row Step 2
Para Y = 3 a Sheet1.Range ("A" & Rows.Count) .End (xlUp) .Row Step 2
Sheet1.Range ("A" & X & ": I" & X) .Interior.Color = RGB (102, 255, 255)
Sheet1.Range ("A" & Y & ": I" & Y) .Interior.Color = RGB (255, 192, 0)

Siguiente y
Siguiente x
End Sub

Y hasta ahora nada para reír porque funciona muy bien!
Pero el problema que me gustaría resolver ahora: sería poder obtener lo mismo en forma automática; Para todas las hojas abiertas.
Es posible de acuerdo con usted hacer esto; Gracias por tu ayuda
Saludos sinceros de A.Maurizio.
######################################################################################################
Traduccion en ingles
######################################################################################################

Hello everyone My name is Maurizio
And my problem is this: In a Modilo I created a function to format the lines with colors to taste.
And this is the function I used:
-------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Option Explicit
Dim X As Long
Dim Y As Long

Sub Ovale1_Click ()
For X = 2 To Sheet1.Range ("A" & Rows.Count) .End (xlUp) .Row Step 2
For Y = 3 To Sheet1.Range ("A" & Rows.Count) .End (xlUp) .Row Step 2
Sheet1.Range ("A" & X & ": I" & X) .Interior.Color = RGB (102, 255, 255)
Sheet1.Range ("A" & Y & ": I" & Y) .Interior.Color = RGB (255, 192, 0)

Next Y
Next X
End Sub

And so far Nothing to Laugh because it works great!
But the problem that I would like to solve now: It would be to be able to get the same thing in Automatic Form; For all open sheets
It is possible according to you to do this; Thanks for your help
Sincere greetings from A.Maurizio

Formattare_Celle _Con_Colori_Alternati - Tutti i Fogli Aperti.xlsm

Featured Replies

publicado

 @A.Maurizio
solo tienes que meter tu codigo entre otro bucle for/next recorriendo las hojas

For j=1 to Sheets.Count

With Sheets(j)

....

End With

Next j

Ten en cuenta que al trabajar con el With sobre las hojas, no debes olvidar el punto " . " delante de los rangos

For X = 2 To .Range ("A" & Rows.Count) .End (xlUp) .Row Step 2

 

publicado
  • Autor

¡Hola Haplox
Yo tu Código Intepretato Cosi:
Opción explícita
Dim X tan largo
Dim Y tan largo
Dim J como Hojas

Sub Ovale1_Click ()
Para J = 1 a Sheets.Count

Para X = 2 a J.Range ("A" & Rows.Count) .End (xlUp) .Entrada Paso 2
Para Y = 3 a J.Range ("A" & Rows.Count) .End (xlUp) .Row Step 2

'Para X = 2 a Sheet1.Range ("A" & Rows.Count) .End (xlUp) .Row Step 2
'Para Y = 3 a Sheet1.Range ("A" & Rows.Count) .End (xlUp) .Row
Paso 2

J. Rango ("A" & X & ": I" & X) .Interior.Color = RGB (102, 255, 255)
J. Rango ("A" & Y & ": I" & Y) .Interior.Color = RGB (255, 192, 0)

Siguiente y
Siguiente x
Siguiente j
End Sub

Sin embargo, esto me da error en este punto:
"Para X = 2 a J.Range (" A "& Rows.Count) .End (xlUp) .Row Step 2"
Por que

publicado
  • Autor

Hola querido
Ahora que estamos aquí?
Ahora funciona muy bien, muchas gracias. Es increíble lo que estaba tratando de hacer. Gracias. Gracias.

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.