I have two rows with years and production like below:
2009 2010 2011 2012 2013 2014
4 4 4 4 0 0
I want to find last year with production which is 2012. Do any of you know about any function I can use for this?
Magne (Norway)
I have two rows with years and production like below:
2009 2010 2011 2012 2013 2014
4 4 4 4 0 0
I want to find last year with production which is 2012. Do any of you know about any function I can use for this?
Magne (Norway)
Last edited by mkvassh; 02-11-2009 at 07:15 AM.
One way ...
![]()
G2: =MAX(IF($A2:$F2,$A$1:$F$1)) commited with CTRL + SHIFT + ENTER
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Hi,
Presuming your data begins at cell A1, and that there will be no years with zero production,
=INDEX(A1:J1,MATCH(0,A2:J2,-1)-1)
Rule 1: Never merge cells
Rule 2: See rule 1
"Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".
I'd go with Sweep's if as mentioned you have no years of 0 production preceding those with production.
Thank you both. I used match/index and it works. Another challenge. What if I have zero prodution in 2011 and a negative number in 2013. Are there any proposals for that situation. Year 2013 is the year I'm looking for then. By other words this.
2009 2010 2011 2012 2013 2014
4 4 0 4 -2 0
The Array provided in post 2 should cover all bases.
It does. Thank you very much :-)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks