View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default getting numbers divisible by 4 from random numbers in ascending or

Or, you can use:

ROWS($1:1)

Which doesn't matter what row the formula is on *and* is robust against row
insertions.

I cringe when I see formulas that use ROW() or ROW(A1). <VBG

Biff

"Max" wrote in message
...
If it starts in row2, use this set instead

In B2:
=IF(OR(A2="",A2=0),"",IF(MOD(A2,4)=0,A2+ROW()/10^10,""))

In C2:
=IF(ROW(A1)COUNT(B:B),"",INDEX(A:A,MATCH(SMALL(B: B,ROW(A1)),B:B,0)))

The key adjustment is more in col C's formula which uses the row
sensitive: ROW() -- just use ROW(A1) instead of ROW() in the top cell
wherever this cell may be (in this case in C2)

An alternative to use in C2 here would be simply to adjust it
arithmetically, ie change ROW() to ROW()-1, viz in C2:
=IF(ROW()-1COUNT(B:B),"",INDEX(A:A,MATCH(SMALL(B:B,ROW()-1),B:B,0)))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"ramana" wrote
Thank you Max, its working perfect, but the problem is when I enter
the formula in row 2 its giving me the second number.