LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Problem identified?

Phil - Please don't change subjects. It makes it impossible for
Google to archive a thread.

Here's a workaround. I've updated the demo file as well:

ftp://ftp.mcgimpsey.com/excel/ph_demo.xls

Private Sub Worksheet_Change(ByVal Target As Range)
Dim nRow As Long
Dim dV As Double
Dim dP As Double
Dim nStart As Long
With Target
If .Count 1 Then Exit Sub
If Not Intersect(.Cells, Range( _
"U19:U30,AD19:AD30,AM19:AM30,AV19:AV30," & _
"U51:U62,AD51:AD62,AM51:AM62,AV51:AV62," & _
"U83:U94,AD83:AD94,AM83:AM94,AV83:AV94")) _
Is Nothing Then
nStart = 10 - 32 * ((.Row = 51) + (.Row = 83))
nRow = (.Column - 21) / 9
dV = Range("V" & nStart).Offset(nRow, 0).Value
dP = Range("P" & nStart).Offset(nRow, 0).Value
If Not dP = dV Then
Application.EnableEvents = False
.Offset(0, 3).Value = (.Value - dV) / (dP - dV)
Application.EnableEvents = True
End If
End If
End With
End Sub

In article ,
"Phil Hageman" wrote:

Tom, Maybe you've hit on something here - it is obvious to
me, but wouldn't be to you, and I have been passing over
it every time I communicate with you folks. Makes me
wonder what else I'm not telling you...

It is possible some "P", "V", and "U" cells may hold no
values - this is a legitimate circumstance for the user.
Sounds like this may be my problem - the cause of blank
and #Div/0!answers. Can you: 1.) modify the code to work
around blank cells (dp - dv < 0), and 2.) make it work in
all three regions of the worksheet independent of cell
entries.

Is it possible for me to send you the worksheet via e-mail?

 
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
VBA code Help needed liamothelegend Excel Programming 1 November 5th 03 12:25 PM
Code Tweek Needed Phil Hageman Excel Programming 0 October 7th 03 07:21 PM
code needed ibo Excel Programming 0 July 29th 03 05:32 PM


All times are GMT +1. The time now is 09:52 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"