ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Want to offset found value using Index (https://www.excelbanter.com/excel-worksheet-functions/59682-want-offset-found-value-using-index.html)

Doug Laidlaw

Want to offset found value using Index
 
I have a combo box in which I select the current month. The value that I
"index" from the Combo Box shows up in Cell B1. In cell B2 I want to use the
index function as well to give me the previous month, in this example it
would "November." In essence how do I pick a month in my combo box, and then
in a cell it shows me the previous month?

I used to use vlookups by adding another column next to the month list in
column A and writing the previous month, but now I want to use the index
formula.

A1 January B1 December
A2 February B2 November
A3 March
A4 April
A5 May
A6 June
A7 July
A8 August
A9 September
A10 October
A11 November
A12 December

Domenic

Want to offset found value using Index
 
Try the following instead...

=TEXT(EDATE(DATEVALUE(B1&" 1, 2005"),-1),"mmmm")

Hope this helps!

In article ,
Doug Laidlaw wrote:

I have a combo box in which I select the current month. The value that I
"index" from the Combo Box shows up in Cell B1. In cell B2 I want to use the
index function as well to give me the previous month, in this example it
would "November." In essence how do I pick a month in my combo box, and then
in a cell it shows me the previous month?

I used to use vlookups by adding another column next to the month list in
column A and writing the previous month, but now I want to use the index
formula.

A1 January B1 December
A2 February B2 November
A3 March
A4 April
A5 May
A6 June
A7 July
A8 August
A9 September
A10 October
A11 November
A12 December


Domenic

Want to offset found value using Index
 
Make that...

=TEXT(DATEVALUE(B1&" 1, 2005")-1,"mmmm")

In article ,
Domenic wrote:

Try the following instead...

=TEXT(EDATE(DATEVALUE(B1&" 1, 2005"),-1),"mmmm")

Hope this helps!

In article ,
Doug Laidlaw wrote:

I have a combo box in which I select the current month. The value that I
"index" from the Combo Box shows up in Cell B1. In cell B2 I want to use
the
index function as well to give me the previous month, in this example it
would "November." In essence how do I pick a month in my combo box, and
then
in a cell it shows me the previous month?

I used to use vlookups by adding another column next to the month list in
column A and writing the previous month, but now I want to use the index
formula.

A1 January B1 December
A2 February B2 November
A3 March
A4 April
A5 May
A6 June
A7 July
A8 August
A9 September
A10 October
A11 November
A12 December



All times are GMT +1. The time now is 11:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com