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 Not returning a number

Function GetValue() as string
WITH WORKSHEETS()"Sheet1")
SELECT CASE TRUE
CASE .Range("C74")<""
GetValue= .Range("C74")
CASE .Range("C63")<""
GetValue= .Range("C63")
CASE .Range("C52")<""
GetValue= .Range("C52")
CASE .Range("C41")<""
GetValue= .Range("C41")
CASE .Range("C30")<""
GetValue= .Range("C30")
CASE ELSE
END SELECT
END FUNCTION

"Ric" wrote:

Thanks in advance. Attempting to write a formula (IF THEN, IFERROR
not really sure) go to an adjacent work sheet and look thru a column
starting at bottom at lines C74, C63,C52,C41 and C30 and when it gets
to the first line of data (example $180) it stops and shows that value-
in this case line C30. Next time may be C41 the time after that C63
but cannot get to work. HELP