Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Formula Help

Status
Not open for further replies.

KoryKyle

Programmer
Jan 15, 2003
1
US
I need help creating a way to tell you the last time something was entered.
Example:
January February March
15 20 0

and the formuala should say "February" since it was the last time something was entered but if I change February to zero is should change to January and so on. Help would be greatly appreciated.
 
Not sure I understand the rules around when a cell should say January vs. Feb vs. any other month.

When you say entered....do you mean a number (i.e. 0 = Jan), or do you mean any text?
 
Hi

Here's a possible solution.

Assume that you have the month names Jan to Jun in cells B3:G3 and numeric entries in the row below (B4:G4). the following formula will tell you which month heads up the last non-zero entry :

=IF(ISNA(INDEX(B3:G4,1,MATCH(0,B4:G4,0)-1)),"Jun",INDEX(B3:G4,1,MATCH(0,B4:G4,0)-1))

The IF() is needed to cater for the eventuality that all 6 months, including Jun, have non-zero entries in them. Barborne
Worcester
UK
 
kyle,

Do you mean that if you inspect the horizontal list of values, you want the Month for the LAST NON-ZERO VALUE?

Help us out here!!! :cool: Skip,
SkipAndMary1017@mindspring.com
 
Try this.

Define name B3 = YYYY
Define name range B4:M4 = HELP
input B3 : year (e.g. 2003)

copy this formula into B5 =DATE(YYYY;COLUMN()-1;1)
right copy this formula from B5 into range B5:M5
format B5:M5 = mmm or mmmm
copy this formula into B4 =IF(B6<>0;MONTH(B5);&quot;&quot;)
right copy this formula from B4 into range B4:M4

copy this formula into A10 =IF(MAX(HELP)=0;&quot;&quot;;DATE(YYYY;MAX(HELP);1))
format A10 = mmmm

input your figures in range B6:M6
last input period (<>0) will appear in A10
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top