I am trying to figure out a formula that will choose values based on a certain date range. So it will review a column of data (lets say column "A") and only use the data from that column IF Column B (which has all the dates in it) is equal to a certain start and finish date (which are two other cells).
I am a real estate appraiser, and am trying to pull out certain data from a larger data set so that I can see average, hi, low, and medians. But I need to sort it into 12 month periods (the most recent, the previous 12 month period, and the 12 month period before that (3 years total). So I want to get (for example) the average asking price of all homes in my 3 years worth of data that occurred only in the period 12 to 24 months ago. To do that, the formula would look at the two cells that state the start and end date of the 12 month period I need, then search column B to see which dates are relevant, and then if the date is relevant it uses the data in column A to (for example) determine the average.
This is what I tried:
=IF(S2:S1498>E1505,AND(S2:S1498<F1505),AVERAGE(G2:G1498))
where "S" is the date column, E1505 & F1505 are the start and end dates, and "G" is the column with the data I am trying to average.
Any help would be appreciated!
Bookmarks