ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   lookup function (https://www.excelbanter.com/excel-worksheet-functions/84018-lookup-function.html)

Susan

lookup function
 
In a spreadsheet, I am trying to populate a cell with the next month. For
example, if cell B1 = Jan., I want C1 to become February (and so on depending
upon the current month.

Any hints/help. I was using the lookup function, but it doesn't always
return the correct month.

SteveG

lookup function
 

Not sure what you mean by "and so on depending on current month". I
assume that B1 has the current month and you want C1 to automatically
update to the next month based on the value in B1. Use the EDATE
function in C1.

=EDATE(B1,1)

If you are looking for a function to return todays month in B1 so each
month it changes then you could use =NOW() or =TODAY() in B1. Format
as mmmm to see the date in text (January, February etc...).

Then use the EDATE in C1. B1 and C1 will update with the change of
each month using these. You can copy the EDATE function across row 1
for the desired number of months.

I believe you need to install the Analysis Toolpak to use the EDATE
function. To do that, go to the Tools Menu, Add-ins, click on the
Analysis Toolpak check box and click on OK. This will run the
install.

Does that help?

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=534170


Bob Phillips

lookup function
 
Just put Jan in a cell, then move the cursor to the cell bottom-right where
it changes to a black cross, then drag across/down to populate the other
cells.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Susan" wrote in message
...
In a spreadsheet, I am trying to populate a cell with the next month. For
example, if cell B1 = Jan., I want C1 to become February (and so on

depending
upon the current month.

Any hints/help. I was using the lookup function, but it doesn't always
return the correct month.




Peo Sjoblom

lookup function
 
Do you want current month in A1 and coming month in B1 and so on? In A1 put

=TEXT(TODAY(),"mmm")

in B1

=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY())+COLUMNS($A $1:A1),1),"mmm")

copy across


--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"Susan" wrote in message
...
In a spreadsheet, I am trying to populate a cell with the next month. For
example, if cell B1 = Jan., I want C1 to become February (and so on
depending
upon the current month.

Any hints/help. I was using the lookup function, but it doesn't always
return the correct month.





All times are GMT +1. The time now is 07:16 AM.

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