PC Review


Reply
Thread Tools Rate Thread

Counting calculated formulas in a Column

 
 
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
 
 
 
 
Bernd P
Guest
Posts: n/a
 
      10th Oct 2009
Hello,

I suggest to use GET.CELL or my UDF GetCell:
http://sulprobil.com/html/get_cell.html

Use HasFormula ...

Regards,
Bernd
 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      10th Oct 2009
See if this is what you want:

Sub countCalc()
Dim lr As Long, rng As Range, ws As Worksheet
Set ws = ActiveSheet 'Change to sheet name?
lr = ws.Cells(Rows.Count, 5).End(xlUp).Row
Set rng = ws.Range("E2:E" & lr)
For Each c In rng
If c.HasFormula = True And c.Value <> 0 Then
Count = Count + 1
End If
Next
MsgBox "There are " & Count & " calculated cells."
End Sub




"Brand" <(E-Mail Removed)> wrote in message
news:3366D0E3-8296-4672-9420-(E-Mail Removed)...
> 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
 
JLGWhiz
Guest
Posts: n/a
 
      10th Oct 2009
If you want to use the procedure like a worksheet function then use this
version:

Function HowMany(rng As Range)
Dim lr As Long, ws As Worksheet
Set ws = ActiveSheet 'Change to sheet name?
lr = ws.Cells(Rows.Count, 5).End(xlUp).Row
Set rng = ws.Range("E2:E" & lr)
For Each c In rng
If c.HasFormula = True And c.Value <> 0 Then
Count = Count + 1
End If
Next
HowMany = Count
End Function

Put the code in the standard code module1.

To enter it on the worksheet:

HowMany(<enter range to count here>)

example: To count range E2 through E200
=HowMany(E2:E200)




"JLGWhiz" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> See if this is what you want:
>
> Sub countCalc()
> Dim lr As Long, rng As Range, ws As Worksheet
> Set ws = ActiveSheet 'Change to sheet name?
> lr = ws.Cells(Rows.Count, 5).End(xlUp).Row
> Set rng = ws.Range("E2:E" & lr)
> For Each c In rng
> If c.HasFormula = True And c.Value <> 0 Then
> Count = Count + 1
> End If
> Next
> MsgBox "There are " & Count & " calculated cells."
> End Sub
>
>
>
>
> "Brand" <(E-Mail Removed)> wrote in message
> news:3366D0E3-8296-4672-9420-(E-Mail Removed)...
>> 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 # of Formulas in a column with formulas and entered data Brand Microsoft Excel Worksheet Functions 1 10th Oct 2009 01:01 PM
Counting cells within a calculated value dugasyl Microsoft Access Getting Started 2 3rd Apr 2009 02:39 AM
counting only results in a column of formulas LaborGuyRJ Microsoft Excel Programming 5 28th Apr 2008 04:47 AM
Pivot Table Formulas Calculated Item / Calculated Field =?Utf-8?B?VmlrcmFtIERoZW1hcmU=?= Microsoft Excel Programming 2 10th Oct 2006 08:45 AM
pivot table formulas for calculated field or calculated item =?Utf-8?B?Vmlja3k=?= Microsoft Excel Misc 3 6th Jun 2006 05:06 AM


Features
 

Advertising
 

Newsgroups
 


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