Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ted Metro
 
Posts: n/a
Default Finding last value greater than 0

In A1:L1 I have January through December
In A2:L2 I have --

200 -- A2
0 -- B2
150
225
0
0
300
400
0
600
0
0 -- L2

To find the first month in which sales are greater than 250 I use this
formula entered as an array - index(A1:L1,match(true,A2:L2250,0))

What formula can I use to find the last month in which sales were greater
than 0, in this example it will be October (600 units)?

Can I modify my existing formula?

Thank you for any help!

Ted

  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default Finding last value greater than 0

One way

=INDEX(A1:L1,MAX((A2:L20)*(COLUMN(A2:L2))))

entered with ctrl + shift & enter

note that column will always count from column A so if your values should
start in C2 going to N2 you should still start with A1 in the INDEX part or
offset the result of the max formula by - 2, but in your example it will
work unattended


--

Regards,

Peo Sjoblom



--

Regards,

Peo Sjoblom

"Ted Metro" wrote in message
...
In A1:L1 I have January through December
In A2:L2 I have --

200 -- A2
0 -- B2
150
225
0
0
300
400
0
600
0
0 -- L2

To find the first month in which sales are greater than 250 I use this
formula entered as an array - index(A1:L1,match(true,A2:L2250,0))

What formula can I use to find the last month in which sales were greater
than 0, in this example it will be October (600 units)?

Can I modify my existing formula?

Thank you for any help!

Ted



  #3   Report Post  
Ted Metro
 
Posts: n/a
Default Finding last value greater than 0

Thank you Peo!

"Peo Sjoblom" wrote:

One way

=INDEX(A1:L1,MAX((A2:L20)*(COLUMN(A2:L2))))

entered with ctrl + shift & enter

note that column will always count from column A so if your values should
start in C2 going to N2 you should still start with A1 in the INDEX part or
offset the result of the max formula by - 2, but in your example it will
work unattended


--

Regards,

Peo Sjoblom



--

Regards,

Peo Sjoblom

"Ted Metro" wrote in message
...
In A1:L1 I have January through December
In A2:L2 I have --

200 -- A2
0 -- B2
150
225
0
0
300
400
0
600
0
0 -- L2

To find the first month in which sales are greater than 250 I use this
formula entered as an array - index(A1:L1,match(true,A2:L2250,0))

What formula can I use to find the last month in which sales were greater
than 0, in this example it will be October (600 units)?

Can I modify my existing formula?

Thank you for any help!

Ted




Reply
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
lookup finding the next value that is GREATER Tim Excel Worksheet Functions 2 September 4th 05 05:27 PM
vlookup - finding the next value that is GREATER than the lookup value? Harold Good Excel Worksheet Functions 6 August 10th 05 10:32 PM
if greater then 99 then 1 if greater then 199 then two N.R. Excel Worksheet Functions 2 June 23rd 05 06:14 PM
Help w/ SUMIF ; INDEX Robert Excel Worksheet Functions 2 March 12th 05 02:23 AM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM


All times are GMT +1. The time now is 02:33 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"