Try this
Sub Macro1()
For Each Sheet In Sheets
For N = 25 To 65536 Step 1200
Sheet.Cells(N, 12).Formula = "=Countif(" & Cells(N, 4).Address
& ",100)"
Next N
Next Sheet
End Sub
In the example the formula counts if the Cell in col 4 in the same row
= 100. Just adapt this for your needs.
--
mrice
Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile:
http://www.excelforum.com/member.php...o&userid=10931
View this thread:
http://www.excelforum.com/showthread...hreadid=559693