What function/formula can I use to return the previous month. Let's say cell
A1 contains the word August. What can I put in the next cell to return
July. But will also give December if January is in A1. I am currently doing
it with the following convoluted vlookup & I'm sure there must be an easier
way.
ColG ColH ColI
12 December 12
11 November 11
10 October 10
9 September 9
8 August 8
7 July 7
6 June 6
5 May 5
4 April 4
3 March 3
2 February 2
1 January 1
0 December 0
-1 November -1
-2 October -2
Above is my vlookup range (columns G,H,I rows 3 to 17) and my formula is:
=VLOOKUP((VLOOKUP(A1,$H$3:$I$17,2,FALSE)-1),$G$3:$H$17,2,FALSE)
It works fine but I know I must be missing something *really* obvious.(and
simpler:-)
Many thanks
-Jay-
Bob Greenblatt - 26 Jun 2006 13:41 GMT
On 6/24/06 1:34 PM, in article C0C33635.3395%zeugma@toucanspam.com, "Jay"
<zeugma@toucanspam.com> wrote:
> What function/formula can I use to return the previous month. Let's say cell
> A1 contains the word August. What can I put in the next cell to return
[quoted text clipped - 30 lines]
>
> -Jay-
If your dates are really text, then your method is about as good as any.
However, if the dates are really an Excel date, but formatted to show the
month. Then you can simply use =month(a1)-1

Signature
Bob Greenblatt [MVP], Macintosh
bobgreenblattATmsnDOTcom