PC Review


Reply
Thread Tools Rate Thread

Counting # of Formulas in a column with formulas and entered data

 
 
Brand
Guest
Posts: n/a
 
      9th Oct 2009
My spread sheet consists of approximately 550 rows and growing. Calculations
are calculated as data is entered by hand from left to right. For instance,
D5:M550 consists of of entered data, formulas that have been calculated, and
formulas that are equivalent to 0 due to not being calculated. I am looking
to be able to count the formulas that have automatically calculated themselfs
in a single column with out counting the values that have replace/deleted the
formulas as the values were entered by hand. This spread sheet calculates
due dates for documents as a previous document has been completed.


Formula= "=IF(D26>1/1/2000,D26+14,0)" Calculated date is in cell E26 is
1/14/2009 if the day which at some point was entered by hand in cell D26 is
>1/1/2000, for instance 1/1/2009. Cell E27 is a hand entered date due to the

document being completed. I need a formula that will count all of the
"calculated dates" in Column E, and not the calculated dates, plus the
entered dates. If more clarification is needed, please let me know.
 
Reply With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      10th Oct 2009
This small UDF will count all the formulas in a range:

Function countf(r As Range) As Long
Dim rr As Range
countf = 0
For Each rr In r
If rr.HasFormula Then
countf = countf + 1
End If
Next
End Function


UDFs are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To use the UDF from the normal Excel window, just enter it like a normal
Excel Function =countf(H1:H100)

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To learn more about UDFs, see:

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx

--
Gary''s Student - gsnu200907


"Brand" wrote:

> My spread sheet consists of approximately 550 rows and growing. Calculations
> are calculated as data is entered by hand from left to right. For instance,
> D5:M550 consists of of entered data, formulas that have been calculated, and
> formulas that are equivalent to 0 due to not being calculated. I am looking
> to be able to count the formulas that have automatically calculated themselfs
> in a single column with out counting the values that have replace/deleted the
> formulas as the values were entered by hand. This spread sheet calculates
> due dates for documents as a previous document has been completed.
>
>
> Formula= "=IF(D26>1/1/2000,D26+14,0)" Calculated date is in cell E26 is
> 1/14/2009 if the day which at some point was entered by hand in cell D26 is
> >1/1/2000, for instance 1/1/2009. Cell E27 is a hand entered date due to the

> document being completed. I need a formula that will count all of the
> "calculated dates" in Column E, and not the calculated dates, plus the
> entered dates. If more clarification is needed, please let me know.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting calculated formulas in a Column Brand Microsoft Excel Programming 3 10th Oct 2009 01:09 AM
counting only results in a column of formulas LaborGuyRJ Microsoft Excel Programming 5 28th Apr 2008 04:47 AM
Excel 2007 is not recalculating formulas when new data is entered FlowerTechie Microsoft Excel Misc 3 12th Jan 2008 05:10 AM
Auto calculate formulas when new data is entered =?Utf-8?B?Q2FtMTIzNA==?= Microsoft Excel Misc 6 15th Feb 2007 05:30 PM
Can Excel recognize when data is entered and apply formulas? =?Utf-8?B?Y3dvb2w0NTEy?= Microsoft Excel Worksheet Functions 2 7th Jul 2005 07:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:10 PM.