Hello,
I have a formula that I spent siginficant time trying to develop, but when I try to paste it into my macro I think that it is to long. When I try to paste it is highlighted in red because the ActiveCell.FormulaR1C1 = is not on the same line as the formula. The formula itself fits on one line. Please help me figure out a way to paste it into the macro. I don't want to start from scratch with my formula
Here is the formula:
=IF(AND(NOT(D2="All"),NOT(E2="All")),COUNTIFS('TS Data'!E2:E60000,">="&B2,'TS Data'!E2:E60000,"<="&C2,'TS Data'!P2:P60000,D2,'TS Data'!O2:O60000,E2,'TS Data'!K2:K60000,"Yes"),IF(AND(D2="All",NOT(E2="All")),COUNTIFS('TS Data'!E2:E60000,">="&B2,'TS Data'!E2:E60000,"<="&C2,'TS Data'!O2:O60000,E2,'TS Data'!K2:K60000,"Yes"),IF(AND(NOT(D2="All"),E2="All"),COUNTIFS('TS Data'!E2:E60000,">="&B2,'TS Data'!E2:E60000,"<="&C2,'TS Data'!P2:P60000,D2,'TS Data'!K2:K60000,"Yes"),COUNTIFS('TS Data'!E2:E60000,">="&B2,'TS Data'!E2:E60000,"<="&C2,'TS Data'!F2:F60000,"Yes",'TS Data'!K2:K60000,"Yes"))))
Here is the code
Any ideas on what I can do to get it to fit into a macro?
Bookmarks