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.

Ajustar texto a celda

publicado

Hola buenas, soy un poco novato pero he estado buscando y no encuentro nada en la red. Lo que yo quiero es ajustar un texto a una celda (combinada). Ojo, no ajustar la celda al texto. Esto es porque ele tamaño de la celda combinada varía y quiero que el texto ocupe toda la celda. Os enseño hasta donde he llegado:

Dim rango as range

Dim variable as byte

Sheets("Sheets1").Range("B2").Value = "TEXTO"

Set rango = Range(Cells(2, 2), Cells(3, Variable + 3))

rango.Merge rango.HorizontalAlignment = xlCenter

rango.VerticalAlignment = xlCenter

rango.Interior.ColorIndex = 41

'AQUÍ QUIERO AJUSTAR EL TEXTO PARA QUE ME OCUPE TODO EL rango

 

Gracias de antemano.

Alfredo

Featured Replies

publicado
  • Autor

Perdón que me conteste yo mismo, es que no me deja editar. He conseguido el objetivo) dándole a font.size un valor muy alto y luego autoshrink = true, pero eso no me vale para otra celda combinada que tengo girada:

 rango.Merge

rango.Orientation = 90

rango.HorizontalAlignment = xlCenter

rango.VerticalAlignment = xlCenter

rango.Font.Size = 200

rango.ShrinkToFit = True

Gracias de nuevo

Editado el por Alfredo Jordán
error tipográfico

  • Silvia bloqueó este tema

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.