Macros

crazyfrances27

New Member
Joined
Jul 12, 2012
Messages
1
Quisiera ejecutar una macro cada vez que en un rango de celdas por ejemplo c3:cj82 cambie una celda.

la macro deberia posicionarse en la celda que cambio y de esa columna tomar el valor de la fila 2 y la fila 85.

Copiarlo en una nueva hoja trasponiendo los datos si ambas celdas se encuentran en una lista.

Desde ya mil Gracias!! soy nuevo en esto de las macro y estoy en el horno!!!!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hola,

Aqui esta el codigo para revisar si hay cambios en el rango y ejecutar el macro:

Private Sub Worksheet_Change(ByVal Target As Range)
'Declara la variable que almacena el rango
Dim KeyCells As Range

' el rango
Set KeyCells = Range("c3:CJ82")

'condicional para checar si hay cambios en el rango
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then

' Ponga el codigo para copiar y pegar aqui

End If

End Sub

Sigue buscando en el foro y encontraras el codigo para copiar y pegar.

Saludos,

Benjamin
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,593
Members
452,654
Latest member
mememe101

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