Macro gives me expected en sub error

Closed
jutulu Posts 34 Registration date Monday March 10, 2014 Status Member Last seen September 21, 2015 - Mar 16, 2014 at 09:35 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Mar 17, 2014 at 12:50 AM
Hello,

I have the below macro, but it gives me compile error expected end sub. This macro below I have copied and paste hoping it would work because I am trying to use countif with column A (a d/m/y format) and the below is to be able to use sumif and countif with date format. Thanks

Sub CountifVBAcontainingdateformat()

Function TypeCell(A As Range) As Variant
Dim V() As Variant
Dim Cel As Range
Dim I As Integer
Application.Volatile '// For revaluation in interactive environment
ReDim V(R.Cells.Count - 1) As Variant
I = 0
For Each Cel In R
V(I) = VarType(Cel) '// Output array has the same size of input range.
I = I + 1
Next Cel
TypeCell = V

End Sub
Related:

1 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Mar 17, 2014 at 12:50 AM
I am confused. there is function within a macro and there is no end function.
please post a very small extract of your data and explain what you are aiming at.
0