LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Formula for multiple cells

I was thinking that code looked too short when I posted it.<g What happened
was I was getting ready to go to sleep for awhile and I wrote up the code
(with the On Error in it), tested it and then went to copy it into the
Clipboard to paste into a response to the OP... Excel crashed. Of course, my
code was not in the recovery worksheet; so I wrote it up again quickly
(remember, I was trying to go to sleep) and obviously forgot to include the
On Error statement. Thanks for catching my omission.

Rick


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Rick

I think you forgot the On Error Goto Whoops

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
On Error Goto Whoops
Application.EnableEvents = False
Target.Value = 20 * Target.Value
End If
Whoops:
Application.EnableEvents = True
End Sub


Gord


On Sat, 26 Jul 2008 05:26:07 -0400, "Rick Rothstein \(MVP - VB\)"
wrote:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
Application.EnableEvents = False
Target.Value = 20 * Target.Value
End If
Whoops:
Application.EnableEvents = True
End Sub





 
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
Using the LEFT formula for multiple cells Emily G Excel Worksheet Functions 3 April 25th 23 09:09 AM
how do i use multiple cells to create a formula ? Rob Welsh (Austin) Excel Discussion (Misc queries) 5 February 24th 10 05:28 PM
Formula for multiple cells spezticle Excel Worksheet Functions 0 July 26th 08 06:09 AM
Using one cells formula in multiple other cells Eric Excel Discussion (Misc queries) 1 June 18th 08 12:15 AM
Look up formula, multiple cells pgarcia Excel Discussion (Misc queries) 8 January 30th 07 10:28 PM


All times are GMT +1. The time now is 12:39 AM.

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"