Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Change event help

Hi there,

I want to create a change event macro that when a change
is made to the first 2 cells in a row, a formula is copied
from the very first row into the next 5 cells of the row
where the change was made.
Hope the layout below makes sense, f1 - f5 represent
formulas.

a b c d e f g
1 Name Rate f1 f2 f3 f4 f5

..
..
..
30 john 12.50 (copy formulas f1 - f5 down here on
change)

Any help would be grately appreciated.

Regards
J
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Change event help

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
On Error GoTo ErrHandler
If Target.Column = 1 Or Target.Column = 2 Then
Application.EnableEvents = False
set rng = Cells(1, 3).Resize(1, 5)
rng.copy cells(Target.row,3)
End If
ErrHandler:
Application.EnableEvents = True
End Sub

--
Regards,
Tom Ogilvy

"Jimbola" wrote in message
...
Hi there,

I want to create a change event macro that when a change
is made to the first 2 cells in a row, a formula is copied
from the very first row into the next 5 cells of the row
where the change was made.
Hope the layout below makes sense, f1 - f5 represent
formulas.

a b c d e f g
1 Name Rate f1 f2 f3 f4 f5

.
.
.
30 john 12.50 (copy formulas f1 - f5 down here on
change)

Any help would be grately appreciated.

Regards
J



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM
Chart Values that change based on Change event ExcelMonkey[_119_] Excel Programming 1 May 15th 04 03:43 AM
Change minimumscale with the change event of a combobox Herbert Chan Excel Programming 1 April 11th 04 12:43 PM
On change event raj Excel Programming 3 December 10th 03 04:23 AM
change event/after update event?? scrabtree23[_2_] Excel Programming 1 October 20th 03 07:09 PM


All times are GMT +1. The time now is 12:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"