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.
publicado

Hola:

A raíz de esta consulta en el foro de "Excel general"

fila activa siempre cen el centro de la pantalla

se me ocurrio esta macro por si a alguien le pueda interesar:


'
Dim Fila, Columna, x, y

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next

Application.ScreenUpdating = False

' Control de cambio de celda activa
'----------------------------------
If Len(Fila) > 0 Then
x = Target.Row - Fila
If x < 0 Then x = x * -1
y = Target.Column - Columna
If y < 0 Then y = y * -1
If x > 1 Or y > 1 Then
Fila = Target.Row
Columna = Target.Column
Exit Sub
End If
Else
Fila = Target.Row
Columna = Target.Column
Exit Sub
End If

' Control scroll vertical
'------------------------
If Target.Row > Fila Then
ActiveWindow.ScrollRow = ActiveWindow.ScrollRow + 1
Fila = Target.Row
ElseIf Target.Row < Fila Then
ActiveWindow.ScrollRow = ActiveWindow.ScrollRow - 1
Fila = Target.Row
End If

' Control scroll horizontal
'--------------------------
If Target.Column > Columna Then
ActiveWindow.SmallScroll ToRight:=1
Columna = Target.Column
ElseIf Target.Column < Columna Then
ActiveWindow.SmallScroll Toleft:=1
Columna = Target.Column
End If

End Sub
[/CODE]

Saludos. Antoni.

Featured Replies

publicado

Buenas Antoni:

Se podria hacer que la celda también tuviera un color, he intentedo meter la instrucción pero no he sido capaz de hacerla funcionar.

Saludos, Luis.

Crear una cuenta o conéctate para comentar

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.