View Single Post
  #1   Report Post  
suzetter
 
Posts: n/a
Default cell/range with formula not recalculating


I know this is an age old problem in Excel and I hope somebody has
figured it out.
I have four adjacent columns in a worksheet
The first column is blank and I have a macro that writes data to the
rows in this column

The second column has the following formula:

Code:
--------------------

=IF(J13="";"";TRUNC(J13))

--------------------


The third column has the following formula:

Code:
--------------------

=IF(OR(J13="";H13="");"";IF(J13-TRUNC(J13)=0;0;60*(J13-H13)))

--------------------


And the third column has the following formula:

Code:
--------------------

=IF(B13="";"";GETPIVOTDATA('PIR-DT DESC'!A1;B13))

--------------------


Anyway, it doesn't really matter what's in these columns because when
data is written to the first column, the last column is supposed to
change and subsequently the other two columns. But they don't, they
show some residual value in memory and the only way to get the formula
to update the results is by placing the cursor in the formula bar and
hitting enter. I tried manually trying to recalculate by using every
form of the F9 function (i.e. with Shift, CTRL, ALT) and nothing works.
I tried using several macros and nothing works:


Code:
--------------------

objworksheet.Range("H13:J27").Calculate
objworksheet.Calculate
objworksheet.Cells(13, 5).Calculate

--------------------


I even tried using a trick I read somewhe

Code:
--------------------

objworksheet.EnableCalculation = False
objworksheet.EnableCalculation = True

--------------------


Anybody has any ideas?


--
suzetter
------------------------------------------------------------------------
suzetter's Profile: http://www.excelforum.com/member.php...fo&userid=7078
View this thread: http://www.excelforum.com/showthread...hreadid=390637