View Single Post
  #16   Report Post  
Posted to microsoft.public.excel.programming
Phil Hageman[_3_] Phil Hageman[_3_] is offline
external usenet poster
 
Posts: 160
Default Code Udated - No Change

Mr. McGimpsey, I confess to ignorance with the vinacular
here. How did I change the subject? I'll try not to do it
again. I don't understand the statement "It makes
it...Google...thread.

I came up on the ftp:... and it shows an .xls sheet with
the numbers, nothing more (answers are correct). Presume
this is all I'm supppose to see. I updated to your code
below with no response. Could the fact that my computer
will not capitalize the word "range" in the code mean VBA
will not recongize portions of the code? I sincerely
believe your efforts should be producing results, and that
the problem is simply me. Please bear with me - I'll try
whatever it takes. Could I sent the worksheet?

Thanks, Phil

-----Original Message-----
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?
.