L
Legacy 108787
Guest
Hi!
I've been reading along on this forum for the past few weeks, and I've always found answers to my questions. Great community!
This time though, I couldn't find a solution, so here I am...
I have the following code:
Now I get a Runtime Error 13: Type Mismatch on the last line I posted in the code.
I don't understand this, as the MyRange is definitely filled. The MyRange.Select shows the correct colums selected. Then why does this give a type mismatch? The MyRange selection has nothing but numeric dates in it, formatted as such (not accidentally formatted as text).
I'm using Excel 2003 SP3, on Windows XP SP2.
I've been reading along on this forum for the past few weeks, and I've always found answers to my questions. Great community!
This time though, I couldn't find a solution, so here I am...
I have the following code:
Code:
Dim MyRange As Range
Set MyRange = Range("Data!B8", Range("Data!B65536").End(xlUp))
MyRange.Select
Sheets("Analyse").Select
Range("C7").Select
Selection.FormulaArray = "=SUM(IF(MONTH(" & MyRange & ")=RC[-2],1,0))"
I don't understand this, as the MyRange is definitely filled. The MyRange.Select shows the correct colums selected. Then why does this give a type mismatch? The MyRange selection has nothing but numeric dates in it, formatted as such (not accidentally formatted as text).
I'm using Excel 2003 SP3, on Windows XP SP2.
Last edited by a moderator: