Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formula Help

I need help with a formula. Here is my scenario, A1:A10 =
the sum of b1:b10 * c1. I need cell A11 to reflect only
the value of the last entry in A1:A10 greater than 0. I
don't want a sum of all. If A1:A5 all contain number and
A6:a10 are 0, can I get A11 to tell me what A5's value
is? Thank you in advance for your help!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Formula Help

A11: =INDEX(A1:A10,MATCH(0,A1:A10,0)-1)

If there aren't any zeroes in the cells A1:A10, the formula will result in
#N/A.

Troy

"Mike M" wrote in message
...
I need help with a formula. Here is my scenario, A1:A10 =
the sum of b1:b10 * c1. I need cell A11 to reflect only
the value of the last entry in A1:A10 greater than 0. I
don't want a sum of all. If A1:A5 all contain number and
A6:a10 are 0, can I get A11 to tell me what A5's value
is? Thank you in advance for your help!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Formula Help

Troy's formula is excellent for the situation of numbers greater than zero
all in a group at the start. If the zeroes will be intermixed, then you can
use this formula
=INDEX(A1:A10,MATCH(9.99999999999999E+307,IF(A1:A1 00,A1:A10,""),1),1)

Entered with Ctrl+Shift+enter rather than just enter since it is an array
formula.

--
Regards,
Tom Ogilvy

TroyW wrote in message
...
A11: =INDEX(A1:A10,MATCH(0,A1:A10,0)-1)

If there aren't any zeroes in the cells A1:A10, the formula will result in
#N/A.

Troy

"Mike M" wrote in message
...
I need help with a formula. Here is my scenario, A1:A10 =
the sum of b1:b10 * c1. I need cell A11 to reflect only
the value of the last entry in A1:A10 greater than 0. I
don't want a sum of all. If A1:A5 all contain number and
A6:a10 are 0, can I get A11 to tell me what A5's value
is? Thank you in advance for your help!





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formula Help

Thanks Tom
-----Original Message-----
Troy's formula is excellent for the situation of numbers

greater than zero
all in a group at the start. If the zeroes will be

intermixed, then you can
use this formula
=INDEX(A1:A10,MATCH(9.99999999999999E+307,IF

(A1:A100,A1:A10,""),1),1)

Entered with Ctrl+Shift+enter rather than just enter

since it is an array
formula.

--
Regards,
Tom Ogilvy

TroyW wrote in message
...
A11: =INDEX(A1:A10,MATCH(0,A1:A10,0)-1)

If there aren't any zeroes in the cells A1:A10, the

formula will result in
#N/A.

Troy

"Mike M" wrote in message
...
I need help with a formula. Here is my scenario,

A1:A10 =
the sum of b1:b10 * c1. I need cell A11 to reflect

only
the value of the last entry in A1:A10 greater than

0. I
don't want a sum of all. If A1:A5 all contain number

and
A6:a10 are 0, can I get A11 to tell me what A5's

value
is? Thank you in advance for your help!





.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Formula Help

Tom,

I think my formula will work with positive and negative numbers (it does in
my limited testing). There can also be multiple zeroes in the list. I'm
assuming that the OP wants the number that is one cell above the FIRST
occurrence of a zero (and that the list will have a bunch of zeroes at the
bottom, e.g. "A6:a10 are 0").

After looking at your formula I see we are solving two slightly different
problems. Thanks.

Troy

"Tom Ogilvy" wrote in message
...
Troy's formula is excellent for the situation of numbers greater than zero
all in a group at the start. If the zeroes will be intermixed, then you

can
use this formula
=INDEX(A1:A10,MATCH(9.99999999999999E+307,IF(A1:A1 00,A1:A10,""),1),1)

Entered with Ctrl+Shift+enter rather than just enter since it is an array
formula.

--
Regards,
Tom Ogilvy

TroyW wrote in message
...
A11: =INDEX(A1:A10,MATCH(0,A1:A10,0)-1)

If there aren't any zeroes in the cells A1:A10, the formula will result

in
#N/A.

Troy

"Mike M" wrote in message
...
I need help with a formula. Here is my scenario, A1:A10 =
the sum of b1:b10 * c1. I need cell A11 to reflect only
the value of the last entry in A1:A10 greater than 0. I
don't want a sum of all. If A1:A5 all contain number and
A6:a10 are 0, can I get A11 to tell me what A5's value
is? Thank you in advance for your help!









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Formula Help

After looking at your formula I see we are solving two slightly different
problems.


I think that is what I said Troy. I used the word positive when I should
have used the word non-zero. Poor choice of words. There was no intent to
say it wouldn't work with negative numbers. Sorry for any confusion on that
point.

--
Regards,
Tom Ogilvy

TroyW wrote in message
...
Tom,

I think my formula will work with positive and negative numbers (it does

in
my limited testing). There can also be multiple zeroes in the list. I'm
assuming that the OP wants the number that is one cell above the FIRST
occurrence of a zero (and that the list will have a bunch of zeroes at the
bottom, e.g. "A6:a10 are 0").

After looking at your formula I see we are solving two slightly different
problems. Thanks.

Troy

"Tom Ogilvy" wrote in message
...
Troy's formula is excellent for the situation of numbers greater than

zero
all in a group at the start. If the zeroes will be intermixed, then you

can
use this formula
=INDEX(A1:A10,MATCH(9.99999999999999E+307,IF(A1:A1 00,A1:A10,""),1),1)

Entered with Ctrl+Shift+enter rather than just enter since it is an

array
formula.

--
Regards,
Tom Ogilvy

TroyW wrote in message
...
A11: =INDEX(A1:A10,MATCH(0,A1:A10,0)-1)

If there aren't any zeroes in the cells A1:A10, the formula will

result
in
#N/A.

Troy

"Mike M" wrote in message
...
I need help with a formula. Here is my scenario, A1:A10 =
the sum of b1:b10 * c1. I need cell A11 to reflect only
the value of the last entry in A1:A10 greater than 0. I
don't want a sum of all. If A1:A5 all contain number and
A6:a10 are 0, can I get A11 to tell me what A5's value
is? Thank you in advance for your help!








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
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


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