LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Functions won't calculate without F2

Good morning all!

I wrote a simple function to calculate the values of all hidden cells in a
range.
It works fine, except that I have to edit the formula with [F2] and [Enter]
before it displays the correct answer - otherwise, it just displays the
result of the previous calculation.

Can anyone help, please?

Thanks in advance

Pete

Function SumHiddenRows(TheHiddenRange)
Dim HiddenTotal As Long
Dim HiddenCell As Range

HiddenTotal = 0
For Each HiddenCell In TheHiddenRange
If HiddenCell.EntireRow.Hidden = True Then
HiddenTotal = HiddenTotal + HiddenCell.Value
End If
Next
SumHiddenRows = HiddenTotal
Calculate
End Function

 
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
Functions / Drop Downs won't calculate Bunecke Excel Worksheet Functions 1 April 20th 10 03:16 PM
functions do not calculate correctly petew812 Excel Worksheet Functions 6 August 8th 08 08:08 PM
Logical functions to calculate points stellarblue11 Excel Worksheet Functions 6 May 25th 06 04:05 PM
Formula & functions intermittently fail to calculate LBarnes Excel Worksheet Functions 2 October 20th 05 06:32 PM
functions do not calculate Jeff Excel Worksheet Functions 2 June 17th 05 01:21 AM


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