I wish it was as easy as pasting creative formulas from Excel to VBA, but alas it is not, which is why i am here...
I have this formula working in a cell, but would like it to work in VBA:
=EOMONTH(EDATE(DATE(YEAR(AA3),FLOOR(MONTH(AA3)-1,3)+1,1),3),-1)
The purpose of it is to get a date and round it to the next quarter end. For example, AA3 = Nov 1, 2017 and the formula results in Dec 31, 2017 (but in date format).
From reading some posts online about the year function it said to write it out something like this:
NewDate = EOMONTH(EDATE(DATE(YEAR(worksheets("MtgFile").cells(y,27)),FLOOR(MONTH($AA3)-1,3)+1,1),3),-1)
However, that's just for the year function. I dont know how all the rest of these work when nested.
The error I am getting is:
Compile error: Expected: )
And it's highlighting 'YEAR' in the formula above
Thanks in advance!
I have this formula working in a cell, but would like it to work in VBA:
=EOMONTH(EDATE(DATE(YEAR(AA3),FLOOR(MONTH(AA3)-1,3)+1,1),3),-1)
The purpose of it is to get a date and round it to the next quarter end. For example, AA3 = Nov 1, 2017 and the formula results in Dec 31, 2017 (but in date format).
From reading some posts online about the year function it said to write it out something like this:
NewDate = EOMONTH(EDATE(DATE(YEAR(worksheets("MtgFile").cells(y,27)),FLOOR(MONTH($AA3)-1,3)+1,1),3),-1)
However, that's just for the year function. I dont know how all the rest of these work when nested.
The error I am getting is:
Compile error: Expected: )
And it's highlighting 'YEAR' in the formula above
Thanks in advance!