Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do you find the position of the first value (< 0) in a list

I have a list of product sales values by month that go back a few years and I
wish to use a formula to workout the first month in which there was a sale
for each product. Is there a formula that can give a reference for the first
value (<0) so that I can lookup the relative position for the month.

Eg
Month 1 £0
Month 2 £0
Month 3 £0
Month 4 £500
Month 5 £0
Month 5 £450

Therefore 1st month is month 4.
I have tried match and offset but cannot get anything to work.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default How do you find the position of the first value (< 0) in a list

Maybe

=INDEX(A2:A10,MATCH(TRUE,B2:B100,0))

Commit with Ctrl+Shift+Enter.

Mike

"Mike@Gentech" wrote:

I have a list of product sales values by month that go back a few years and I
wish to use a formula to workout the first month in which there was a sale
for each product. Is there a formula that can give a reference for the first
value (<0) so that I can lookup the relative position for the month.

Eg
Month 1 £0
Month 2 £0
Month 3 £0
Month 4 £500
Month 5 £0
Month 5 £450

Therefore 1st month is month 4.
I have tried match and offset but cannot get anything to work.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default How do you find the position of the first value (< 0) in a list

=INDEX(A1:A20,MIN(IF(B1:B20<0,ROW(B1:B20))))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Mike@Gentech" wrote in message
...
I have a list of product sales values by month that go back a few years and
I
wish to use a formula to workout the first month in which there was a sale
for each product. Is there a formula that can give a reference for the
first
value (<0) so that I can lookup the relative position for the month.

Eg
Month 1 £0
Month 2 £0
Month 3 £0
Month 4 £500
Month 5 £0
Month 5 £450

Therefore 1st month is month 4.
I have tried match and offset but cannot get anything to work.



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
Array to find relative position - is there a better way? John Michl Excel Worksheet Functions 3 October 8th 07 04:47 PM
How do I find the position of the lowest value in a row? melh31 Excel Discussion (Misc queries) 2 May 15th 06 06:21 PM
find nth position of a string TUNGANA KURMA RAJU Excel Discussion (Misc queries) 6 October 18th 05 01:25 PM
How do I find random number in list of random alpha? (Position is. jlahealth-partners Excel Discussion (Misc queries) 0 February 8th 05 05:31 PM
Use MATCH to find position of max in 2D range? Peter B Excel Worksheet Functions 4 October 28th 04 05:23 PM


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