LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jay
 
Posts: n/a
Default Function to give previous month

What function/formula can I use to return the previous month. Let's say cell
A1 contains just 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'm sure I must be missing something *really* obvious.(and
simpler:-)

Many thanks

-Jay-

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count dates for previous month [email protected] Excel Worksheet Functions 3 April 30th 06 08:40 PM
date of last friday of previous month tkaplan Excel Discussion (Misc queries) 7 November 14th 05 06:05 PM
How do I set a date function for previous monthend? JDP289 Excel Discussion (Misc queries) 2 September 8th 05 06:57 PM
automatically update chart plotting current month and previous 6 Jane Charts and Charting in Excel 1 September 1st 05 10:19 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM


All times are GMT +1. The time now is 12:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"