brouz
07-09-2008, 01:22 PM
Hello,
I've googled for hours.. i need help with Fiscal Month subtotaling..actually, I'm trying to create a procedure (or function) that will identify the Fiscal month based on date range, enter the value in another column (ex. "APRIL"), that way i can subtotal by the new column. This is a 4-4-5 Calender, so i can't just identify the month of the date in each cell.
My dates are in Column E and Column D is blank (where i want to enter the Fiscal month.
Can anyone help me out?
Sub FiscalMonth()
Range("E2").Select
If Date >= DateSerial(2008, 3, 31) _
And Date <= DateSerial(2008, 4, 26) _
Then ActiveCell.Offset(0, -1).Formula = "=APRIL"
If Date >= DateSerial(2008, 4, 27) _
And Date <= DateSerial(2008, 5, 24) _
Then ActiveCell.Offset(0, -1).Formula = "=MAY"
End Sub
Thanks!
I've googled for hours.. i need help with Fiscal Month subtotaling..actually, I'm trying to create a procedure (or function) that will identify the Fiscal month based on date range, enter the value in another column (ex. "APRIL"), that way i can subtotal by the new column. This is a 4-4-5 Calender, so i can't just identify the month of the date in each cell.
My dates are in Column E and Column D is blank (where i want to enter the Fiscal month.
Can anyone help me out?
Sub FiscalMonth()
Range("E2").Select
If Date >= DateSerial(2008, 3, 31) _
And Date <= DateSerial(2008, 4, 26) _
Then ActiveCell.Offset(0, -1).Formula = "=APRIL"
If Date >= DateSerial(2008, 4, 27) _
And Date <= DateSerial(2008, 5, 24) _
Then ActiveCell.Offset(0, -1).Formula = "=MAY"
End Sub
Thanks!