#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 58
Default Formula help!!!

I am trying to write a formula that will look in one cell and if it
finds a value greater than zero it pulls that number in. If the cell
is blank or the value is zero it will move to the next cell. If that
cell value is greater than zero it will pull it in if blank or equal
to zero it will go to the next cell.

Any help is appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 698
Default Formula help!!!

With
A1:A3 containing either positive numbers or blanks

Try something like this:
=INDEX(A1:A3,SUMPRODUCT(MATCH(1,--(A1:A30),1)))

If none of the cells contains a positive value, the formula returns zero.

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"japc90" wrote:

I am trying to write a formula that will look in one cell and if it
finds a value greater than zero it pulls that number in. If the cell
is blank or the value is zero it will move to the next cell. If that
cell value is greater than zero it will pull it in if blank or equal
to zero it will go to the next cell.

Any help is appreciated.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 698
Default Formula help!!!

Doesn't it just figure.....I click the [post] button *then* I see the flaw in
the formula.

Try this, instead:
=IF(COUNTIF(A1:A3,"0"),INDEX(A1:A3,SUMPRODUCT(MAT CH(1,--(A1:A30),0))),0)

***********
Regards,
Ron

XL2002, WinXP


"Ron Coderre" wrote:

With
A1:A3 containing either positive numbers or blanks

Try something like this:
=INDEX(A1:A3,SUMPRODUCT(MATCH(1,--(A1:A30),1)))

If none of the cells contains a positive value, the formula returns zero.

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"japc90" wrote:

I am trying to write a formula that will look in one cell and if it
finds a value greater than zero it pulls that number in. If the cell
is blank or the value is zero it will move to the next cell. If that
cell value is greater than zero it will pull it in if blank or equal
to zero it will go to the next cell.

Any help is appreciated.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 698
Default Formula help!!!

While the 2nd formula I posted works.....
try this much less fancy one:
=IF(A10,A1,IF(A20,A2,IF(A30,A3,0)))

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Ron Coderre" wrote:

Doesn't it just figure.....I click the [post] button *then* I see the flaw in
the formula.

Try this, instead:
=IF(COUNTIF(A1:A3,"0"),INDEX(A1:A3,SUMPRODUCT(MAT CH(1,--(A1:A30),0))),0)

***********
Regards,
Ron

XL2002, WinXP


"Ron Coderre" wrote:

With
A1:A3 containing either positive numbers or blanks

Try something like this:
=INDEX(A1:A3,SUMPRODUCT(MATCH(1,--(A1:A30),1)))

If none of the cells contains a positive value, the formula returns zero.

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"japc90" wrote:

I am trying to write a formula that will look in one cell and if it
finds a value greater than zero it pulls that number in. If the cell
is blank or the value is zero it will move to the next cell. If that
cell value is greater than zero it will pull it in if blank or equal
to zero it will go to the next cell.

Any help is appreciated.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 58
Default Formula help!!!

On Apr 10, 8:50 pm, Ron Coderre
wrote:
While the 2nd formula I posted works.....
try this much less fancy one:
=IF(A10,A1,IF(A20,A2,IF(A30,A3,0)))

Does that help?
***********
Regards,
Ron

XL2002, WinXP



"Ron Coderre" wrote:
Doesn't it just figure.....I click the [post] button *then* I see the flaw in
the formula.


Try this, instead:
=IF(COUNTIF(A1:A3,"0"),INDEX(A1:A3,SUMPRODUCT(MAT CH(1,--(A1:A30),0))),0)


***********
Regards,
Ron


XL2002, WinXP


"Ron Coderre" wrote:


With
A1:A3 containing either positive numbers or blanks


Try something like this:
=INDEX(A1:A3,SUMPRODUCT(MATCH(1,--(A1:A30),1)))


If none of the cells contains a positive value, the formula returns zero.


Does that help?
***********
Regards,
Ron


XL2002, WinXP


"japc90" wrote:


I am trying to write a formula that will look in one cell and if it
finds a value greater than zero it pulls that number in. If the cell
is blank or the value is zero it will move to the next cell. If that
cell value is greater than zero it will pull it in if blank or equal
to zero it will go to the next cell.


Any help is appreciated.- Hide quoted text -


- Show quoted text -


PERFECT! Thank you



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



All times are GMT +1. The time now is 02:37 AM.

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"