View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Glenn Glenn is offline
external usenet poster
 
Posts: 1,240
Default Create auto numbering

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


Assuming your data starts in row 1, put the following in A1:

=IF(B1="NO","",COUNTIF($B$1:B1,"<NO"))