View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default macro needed for non-blank cells

Try something like this:

With
Cells A1:A100 containing 1's, 0's, or other values

This formula tests if the last non-blank cell in A1:A100 equals zero
B1: =LOOKUP(2,1/(A1:A100<""),A1:A100)=0

Adjust range references to suit your situation.

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

XL2002, WinXP


"beecher" wrote:

I am trying to write a formula that is contingent on an adjacent column.
Specifically, I am writing a formula using multiple IF worksheet functions.
In an adjacent column I have a series of 1's and 0's with non-blank cells in
between. Does anyone know how to write a formula that will read a previous
column for the last non-blank cell?

Here is an illustration that might help:

Column 1 Column 2
0
IF function to be put here that will give a 'true' value only
if the last non-
blank cell in column 1 is equal to 0
0


1


0


1

Thanks a lot!