View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mr tom mr tom is offline
external usenet poster
 
Posts: 119
Default Should be easy, but...

In essence, there will be a feed from a data warehouse dumping say 24 months
of data into a sheet.

I want to select and chart data from the 12 months prior to the current one.

Forget =TODAY() etc as I could run the report at any time. I'll just have
the month and year entered into a cell (there's a master control for the
reporting, so I'll use that.

What I'm trying to do is, e.g. if the reporting month is Feb 07, I need to
see the year to (but excluding feb), i.e. I need to pick all the entries from
Feb 06 to Jan 07.

Is this any clearer?

Cheers,

"vezerid" wrote:

Lemme see if I understand. You have the "dates" (months actually as I
see them) in something like A2:A13. And you have, say, February 2007
in another cell, say F2. What would you like to get? January 2007? If
so you do not really need the table in A2:A13.

=TEXT(DATE(YEAR(DATEVALUE(1&" "&F2)),MONTH(DATEVALUE(1&"
"&F2))-1,1),"Mmmm yyyy")

Does this help?
Kostis Vezerides

On Mar 6, 3:06 pm, mr tom <mr-tom at mr-tom.co.uk.(donotspam) wrote:
OK.

I've got a list of dates expressed as text:

January 2006
February 2006
...
...
...
December 2007

I've then got a cell containing the curret reporting period, expressed as
text, February 2007

I'm looking for a formula which will look up the current reporting period
within my list of dates and return the text date above it.

Ultimately, I'll then use a VLookup to return the adjacent data, but I can
manage that without too much help.

I know this should be easy, but I've been messing about with this for an
hour or so now, so...

Any help appreciated.

Tom.