I have a table (2x12) of data (sales $) for each month (one row per month) in the Current Year(CY) and Previous Year (PY) columns. I'm trying to calculate the YTD sales (by month) of CY and PY based on today's date using the function, Today().
I know I can use a formula like PY-YTD = SUM(PY1:PY4) to sum the first four rows (Jan-Apr) on the PY sales. This works for the month of May. Upon entering the month of June, 'PY4' will need to be updated to 'PY5'.
I know I can calculate the needed row by using MON(TODAY())-1. e.g. on May 4th, MON(TODAY())-1=4; on Jun 1, MON(TODAY())-1 = 5. Is there a way I can use 'MON(TODAY())-1' in a formula like this: SUM(PY1:PY'MON(TODAY()-1') to enable the calculation to use the correct row number without the need to update each month?
Thank you, John