View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default Looking thru a worksheet

option1
nested IF statements
=IF(x<0,x,IF(y<0,Y,IF(Z<0,Z,0) ) )
up to 7 i think, but its UGLY

option 2
use a UDF
remember these cascade down

FUNCTION GetValue() as double
WITH Worksheets("Piazzo Ware")
dim x as double
SELECT TRUE
CASE .Range("C30")<0:x=.Range("C30")
CASE .Range("C74")<0.Range("C74")
CASE .Range("C52")<0.Range("C52")
CASE .Range("C41")<0.Range("C41")
ELSE 0
END SELECT

GetValue = x
end function

and there's no real limit on CASE's



"Ric" wrote:

Additional help on a formula change:

This formula works IF(ISERROR('Piazzo Ware'! C30),"", 'Piazzo
Ware'!C30) however I have an additional question;
how do I make this look in C74 and if there isn't a value there go to
C63, no value, go to C52, no valur look into C41, agin if there isn't
a value then go to C30?

Thanks