Arrastrar formula al detectar valor fila

dbuera

New Member
Joined
Aug 14, 2015
Messages
1
Buenas tardes,

Recurro a ustedes, para intentar que alguien me ayude a dar con la macro adecuada.
Tengo un documento, con registros de personas (nombres, apellidos, fechas de nacimiento...) y otra columna de edad que se calcula con la fecha de nacimiento mediante la siguiente formula
Code:
[COLOR=#141414][FONT=Georgia]=SIFECHA(--SUSTITUIR(F5;".";"/");HOY();"y")[/FONT][/COLOR]


, pero cada vez que ingreso un registro desde la 1a hoja, con la fecha de nacimiento no se me actualiza la edad, he probado con esta macro pero no me funciona, solo si la ejecuto manualmente.
Code:
[COLOR=#141414][FONT=Georgia]Sub RellenarColumnaI()[/FONT][/COLOR]

[COLOR=#141414][FONT=Georgia]Range("I2").AutoFill Destination:=Range("I2:I" & Range("A" & Rows.Count).End(xlUp).Row)[/FONT][/COLOR]

[COLOR=#141414][FONT=Georgia]End Sub[/FONT][/COLOR]


Me gustaría cada vez que se ingrese un registro con su fecha de nacimiento se actualizara su edad automáticamente.

Contraseña: macro

Muchas gracias,

Un saludo

Adjuntos:



 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Y si haces que el codigo se ejecute cada vez que cambie la celda F5....

Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range

' La variable KeyCells contiene la celda que
' causara que el macro se ejecute cuand haya habido un cambio en la casilla.
Set KeyCells = Range("f5")

If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then

' Ponga su codigo aqui.
Range("I2").AutoFill Destination:=Range("I2:I" & Range("A" & Rows.Count).End(xlUp).Row)

End If
End Sub


El codigo no es de mi cosecha, sino lo tome de la pagina de apoyo de Microsoft.

Saludos,

Benjamin
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,549
Members
449,089
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top