Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 50
Default Create auto numbering

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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"))
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Create auto numbering

Glenn wrote:
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"))


And then fill down as needed.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Create auto numbering

Hi,

Put a 1 in a1 then this formula in a2 and drag down

=IF(B2<"No",MAX($A$1:A1)+1,"")

Mike

"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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 75
Default Create auto numbering

Assuming that you want the numbering to skip if column contaibns "No", try
entering this into A1 and copying it down:-

=IF(B1<"No",ROW(B1)-COUNTIF($B$1:B1,"No"),"")
--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


"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



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Create auto numbering

Hi,

Really not much of an improvement, but a tiny bit shorter:

=IF(B2="No","",MAX(A$1:A1)+1)

--
Thanks,
Shane Devenshire


"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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto numbering Manos Excel Worksheet Functions 4 October 31st 08 08:01 AM
Auto Numbering Nigel 2000 Excel Discussion (Misc queries) 2 September 19th 06 09:34 AM
Auto Numbering Franksta Excel Worksheet Functions 0 March 26th 06 11:48 PM
Auto Numbering Andy JL New Users to Excel 3 November 23rd 05 05:09 AM
auto numbering Tricky Nicky Excel Discussion (Misc queries) 2 December 29th 04 05:44 PM


All times are GMT +1. The time now is 06:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"