View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Last row w/ non-null result of formula

You could use this...

LastRowWithValue = ActiveSheet.Range("A:A").Find(What:="*", _
SearchDirection:=xlPrevious, Lookin:=xlValues, _
SearchOrder:=xlColumns).Row

where you can swap out ActiveSheet for a specific worksheet using, as an
example, Worksheets("Sheet1"); and change the column references within the
Range function call.

--
Rick (MVP - Excel)


"wpiet" wrote in message
...
I know how to use the End(xlUp) property to find the last row with data.
However, I have a sheet full of formulas which return either a value or
NULL.
Using End(xlUp) returns the last row containing anything, including
formulas.
How do I find the last row that contains NON-NULL VALUES resulting from
these formulas.

For example, I have 20 rows with formulas in them.
Only the first "x" rows have non-null values resulting from these
formulas.
The remaining (20 - "x") rows contain the formulas but they return null
values.
How do I determine the value of "x"?
--
Will