Looking thru a worksheet

R

Ric

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
 
P

Patrick Molloy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top