View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John C[_2_] John C[_2_] is offline
external usenet poster
 
Posts: 1,358
Default Create auto numbering

Assuming you start number in A1...
A1: =IF($B1="No","",ROW()-COUNTIF($B$1:$B1,"No"))
If you are starting your numbering anywhere below that, just subtract an
additional number that is 1 less than the current row, and change your range
accordingly...
i.e.
A4: =IF($B4="No","",ROW()-COUNTIF($B$4:$B4,"No"))
--
** John C **


"Manos" wrote:

I have an excel where in column A i want to create an auto numbering.
In column B i have some codes and value No.
SO i want to count only the lines that have codes, an no the lines that have
value No.

A B
1 sub1
2 sub2
NO
3 sub3

thanks in advance for your prompt response

Manos