View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Titanus
 
Posts: n/a
Default Comparing against first non-blank cell

Okay, here's the problem:

I have two columns: A and B. A is a listing of stock prices, in
random order. B is a column of Peaks or Price Highs, based on column
A.

SO: A1=B1. B2: IF(A2B1, A2, ""). The return here is " " (so I have
B1 with a value, then B2 with a blank). Now, for B3: I want to say IF
B2 is a blank, then go to B1 and check that there is a value there; if
so, IF A3this first non-blank cell, THEN B3=A3.

And I want it to slide down the column as I go. Meaning that if I have
a value at B1, B2, B3, then blanks to B10, then the NEXT comparison
will be against B10 (since that's the last non-blank cell in the
column, SO FAR).

So it's a moving formula, as I work my way down the spreadsheet as
opposed to being at the end of a column and looking upward to a single
cell with the first nonblank cell I see.

Thank you for your help.