View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Treetop
 
Posts: n/a
Default Excel not calculating formulas


Hi

Found the same behaviour when using user functions defined in VBA.
I use simple workaround: removing a row from a sheet forces Excel to
calculate all formulas. I simply wrote a macro that goes to the last
cell in the sheet, then moves activecell one row down and remove active
row. I assign it to the button called 'DO Calculate'. It is quite messy,
I was in the hurry writing it ;). It also returns to active cell
afterward.


Do anyone have an idea how to fix it permanently, some option in
Excel?



Sub RemoveLastRow()

startx = ActiveCell.Column
starty = ActiveCell.row
backtostart = Cells(starty,
startx).AddressLocal(RowAbsolute:=False, ColumnAbsolute:=False)

ActiveCell.SpecialCells(xlLastCell).Select
x = ActiveCell.Column
y = ActiveCell.row
newaddr = Cells(y + step, x).AddressLocal(RowAbsolute:=False,
ColumnAbsolute:=False)
Range(newaddr).Activate

row = ActiveCell.row
rowStr = StrConv(row, 1)

removeme = rowStr + ":" + rowStr

Rows(removeme).Select
Selection.Delete Shift:=xlUp
Range(backtostart).Activate

End Sub


--
Treetop
------------------------------------------------------------------------
Treetop's Profile: http://www.excelforum.com/member.php...o&userid=33070
View this thread: http://www.excelforum.com/showthread...hreadid=528411