View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Wigi Wigi is offline
external usenet poster
 
Posts: 396
Default How to use the rownumber of the current cell in a formula

You could use the function ROW() (so without argument between brackets).

--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Wim Goelen" wrote:

Hi,

is there a way to retrieve the rownumber of the cell that "has the focus"? I
would like to calculate a number of values in the top row, but the formulas
need the rownumber to look up the correct prices.

In the formula below, the cell will contain a value of 50, 20 or zero,
depending on where the user's cursor is placed, the rownumber is then put in
D5

=IF(INDIRECT(CONCATENATE("H";D5))0;50;IF(INDIRECT (CONCATENATE("L";D5))0;20;0))

Thanks,

Wim Goelen