COUNT-COUNT
Try this :
Sub countcount()
' gsnu 12_19_2006
Dim r1 As Range, r2 As Range
Dim w1 As Worksheet, w2 As Worksheet
Dim n1 As Long, n2 As Long
Set w1 = Worksheets(Application.InputBox("enter sheetname:", Type:=2))
Set w2 = Worksheets(Application.InputBox("enter other name:", Type:=2))
Set r1 = w1.UsedRange
Set r2 = w2.UsedRange
n1 = r1.Rows.Count + r1.Row
n2 = r2.Rows.Count + r2.Row
MsgBox ("Difference in number of row is: " & (n2 - n1))
End Sub
--
Gary's Student
"Rachel" wrote:
, I have two worksheets open that are similar. What I need to know if there
is a formula which tells me if there is a difference in number of rows
between the first and second sheet.
|