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.

Referencias relativas VBA

publicado

Hola a todos!

Espero alguien me pueda ayudar. Tengo el siguiente código pero al ejecutarlo coloca la formula con referencias fijas (con signo $) si quisiera que fuera relativa para poder copiar y pegar ¿cómo puedo cambiar el código para que la celda sea relativa o fija? ¿Alguna idea?

 

  fil = ActiveCell.Rows.Row
    Selection.FormulaR1C1 = "=(R" + Trim(Str(fil)) + "C4*8)"

 

 

Muchas gracias.

Featured Replies

publicado

Puede ser así:

Dim valor as Integer

Valor = Activecell.value

o bien

Dim Valor as String

Valor = Activecell.adress(0,0)

y sustituyes

fil = ActiveCell.Rows.Row
    Selection.FormulaR1C1 = "=(R" + Trim(Str(fil)) + Valor*8)"

Aunque nos gustaría ver tu archivo para poder ayudarte mejor!!

Saludos!!!

 

publicado

si quieres que la formula te aparezca sin el signo $ usa el siguiente codigo

Sub MULTIPLICA()
FILA = ActiveCell.Offset(0, 1).Address(False, False)
ActiveCell.Value = "=" & FILA & "* 8"
End Sub

publicado

checa el archivo con la modificacion, solo agregas dos lineas al inicio de lamacro y listo, te coloca la formula sin el signo de pesos, en el archivo solo da click en el boton que pusiste y listo.

Sub Primero()
'
' Primero Macro
'

fila = Cells(ActiveCell.Rows.Row, 4).Address(False, False)
ActiveCell.Value = "=" & fila & "*8"

    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 65535
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With

End Sub

Ejemplo - copia.xlsm

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