dates

  • Thread starter Thread starter TimO
  • Start date Start date
T

TimO

Is there a formula to ad a numeric value to the name of a
month. I am running a query in excel (pulling from an
external source) and would like to sort as teh table
refreshes by month and year. I have code to to do the
refresh and the sort, but it sorts in alphabetical
order. I was thinking a formula could place a numeric
value to the month (1 = Jan, 2 = Feb, etc) and I can sort
based on that. Is there an easy formula to do this.

Thanks in advance
 
Your easy formula could be:

=MATCH(A1,{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov"
,"Dec"},FALSE)

Or your could reference a table of month names instead of embedding the
month array.
 
Back
Top