Hi...again, lol
I have a macro that I've used with no problem countless times now, that for some reason is now giving me a "Runtime error '1004": Application-defined or object-defined error"
Basically, the macro is a way to help us determine email formats at my company.
(DISCLAIMER: We DO NOT spam. Everyone we send to have opted-in, however for privacy reasons, I couldn't include the actual email addresses, so instead, I put together an example from some other files and sources of my own.)
Now, with that outta the way...
Basically, the macro does the following:
1) It takes the prefixes in Column A that belong to a specific domain: (the domain is in Column D.)
2) In Column B, the macro does a simple "if" formula to check if the value in the previous row of Column D is the same as the value in the current row of Col D.
3) If the value is different, the macro assumes that the email addresses belonging to a particular domain are complete.
4) The macro begins a series of calculations in Columns E, F, G, H and I.
5) Everything is copied and pasted over itself as values only.
Now, for some reason at Line 53, the Runtime Error triggers. (This is not happened any other time previously.) Here is the line of code:
Range("E" & EndRow + 1).FormulaR1C1 = "=COUNTIF(R[-" & EndRow - StartRow + 1 & "]C[-4]:R[-1]C[-4],""*.*"")/COUNTA(R[-" & EndRow - StartRow + 1 & "]C[-4]:R[-1]C[-4])"
(At first, I thought I was missing a "." somewhere, but I don't think so...)
-I have not changed the macro from when I originally used it (mehmet, a user here was kind enough to develop it for me. it worked seamlessly!)
-I've checked and there are no #N/A or #VALUE or #DIV/0! errors in the data.
-I've attached the file for review.
-I've been trying to figure this out ALL day with no luck.
Any help would be greatly appreciated. (again).
Thanks,
R.J.
Bookmarks