#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 80
Default counting range

In column A I have numbers. How can I in column B start a count from 1 each
time that I get different number. For example:


What I have:

A

200
200
200
200
788
788
788
922
922
922
922

The result:

A B

200 1
200 2
200 3
200 4
788 1
788 2
788 3
922 1
922 2
922 3
922 4

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200802/1

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 230
Default counting range

Put 1 in B1
and =IF(A2=A1,B1+1,1) in B2 and copy down.

Rob

"saman110 via OfficeKB.com" <u35670@uwe wrote in message
news:7fbe56c1fe055@uwe...
In column A I have numbers. How can I in column B start a count from 1
each
time that I get different number. For example:


What I have:

A

200
200
200
200
788
788
788
922
922
922
922

The result:

A B

200 1
200 2
200 3
200 4
788 1
788 2
788 3
922 1
922 2
922 3
922 4

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200802/1



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default counting range

One way:

Numbers in the range A1:A11

Enter 1 in cell B1

Enter this frmula in B2 and copy down to B11:

=IF(A2=A1,B1+1,1)

--
Biff
Microsoft Excel MVP


"saman110 via OfficeKB.com" <u35670@uwe wrote in message
news:7fbe56c1fe055@uwe...
In column A I have numbers. How can I in column B start a count from 1
each
time that I get different number. For example:


What I have:

A

200
200
200
200
788
788
788
922
922
922
922

The result:

A B

200 1
200 2
200 3
200 4
788 1
788 2
788 3
922 1
922 2
922 3
922 4

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200802/1



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default counting range

In B1: =COUNTIF(A$1:A1,A1)

copy down as far as needed


"saman110 via OfficeKB.com" wrote:

In column A I have numbers. How can I in column B start a count from 1 each
time that I get different number. For example:


What I have:

A

200
200
200
200
788
788
788
922
922
922
922

The result:

A B

200 1
200 2
200 3
200 4
788 1
788 2
788 3
922 1
922 2
922 3
922 4

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200802/1


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
Counting from one range to another range, multiple criteria macamarr Excel Discussion (Misc queries) 3 June 10th 06 11:02 AM
Counting a range Blink Excel Worksheet Functions 3 August 25th 05 04:21 PM
counting a cell range within a range mmay321 Excel Worksheet Functions 2 August 10th 05 03:56 PM
counting occurrences in a range Judy Felfe Excel Discussion (Misc queries) 3 July 20th 05 07:25 PM
Counting within a filtered range Jeff Excel Worksheet Functions 2 June 13th 05 03:33 AM


All times are GMT +1. The time now is 02:37 PM.

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"