#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Counting rows???

I have the following in a spreadsheet:

Column A
6650
8334
2331
6650
6650
2331
6650

I want to create a function that will count Column A but do some sort of
incremental counting. This is the result I would like to achieve:

Column A Column B
6650 1
8334 1
2331 1
6650 2
6650 3
2331 2
6650 4

Please help. I have about 25,00o records and I don't want to do this
manually. I've tried =countif and other things. Please advise.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Counting rows???

In B1, put 1. In B2, enter:

=COUNTIF($A$1:A2,A2) and copy down
--
Gary''s Student - gsnu200796
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Counting rows???

WOW!!! That easy, huh? Thank you. It worked.

"Gary''s Student" wrote:

In B1, put 1. In B2, enter:

=COUNTIF($A$1:A2,A2) and copy down
--
Gary''s Student - gsnu200796

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default Counting rows???

On Wed, 30 Jul 2008 09:03:01 -0700, Gary''s Student
wrote:

In B1, put 1. In B2, enter:

=COUNTIF($A$1:A2,A2) and copy down


Or just put

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

in B1 and copy down

Lars-Åke

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Counting rows???

Okay...need to add to it.

My spreadsheet is grouped by Member ID, is there away to copy the formula
so the range is restricted to that Member? For example,

Column A (Member ID) Column B
123 6650
123 8834
123 2331
123 6650
123 6650

456 8834
456 2231
456 2231
456 8834
456 6650

Any ideas?

Thank you.

"Gary''s Student" wrote:

In B1, put 1. In B2, enter:

=COUNTIF($A$1:A2,A2) and copy down
--
Gary''s Student - gsnu200796



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default Counting rows???

On Wed, 30 Jul 2008 09:21:01 -0700, Lockedhart
wrote:

Okay...need to add to it.

My spreadsheet is grouped by Member ID, is there away to copy the formula
so the range is restricted to that Member? For example,

Column A (Member ID) Column B
123 6650
123 8834
123 2331
123 6650
123 6650

456 8834
456 2231
456 2231
456 8834
456 6650

Any ideas?

Thank you.

"Gary''s Student" wrote:

In B1, put 1. In B2, enter:

=COUNTIF($A$1:A2,A2) and copy down
--
Gary''s Student - gsnu200796


Try this formula in cell C1 and copy down

=IF(A1="","",SUMPRODUCT((A$1:A1=A1)*(B$1:B1=B1)))

Ready for next additional requirement ;-)

Lars-Åke

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Counting rows???

Very cute Lars-Ake! No more additions to my problem. This is it.

When you have time can you explain this in 'English'?

Thanks.

"Lars-Ã…ke Aspelin" wrote:

On Wed, 30 Jul 2008 09:21:01 -0700, Lockedhart
wrote:

Okay...need to add to it.

My spreadsheet is grouped by Member ID, is there away to copy the formula
so the range is restricted to that Member? For example,

Column A (Member ID) Column B
123 6650
123 8834
123 2331
123 6650
123 6650

456 8834
456 2231
456 2231
456 8834
456 6650

Any ideas?

Thank you.

"Gary''s Student" wrote:

In B1, put 1. In B2, enter:

=COUNTIF($A$1:A2,A2) and copy down
--
Gary''s Student - gsnu200796


Try this formula in cell C1 and copy down

=IF(A1="","",SUMPRODUCT((A$1:A1=A1)*(B$1:B1=B1)))

Ready for next additional requirement ;-)

Lars-Ã…ke


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 characters in multiple rows when rows meet specific criteria news.virginmedia.com Excel Worksheet Functions 3 June 28th 08 09:03 PM
Counting Rows klafert Excel Discussion (Misc queries) 0 September 14th 06 06:37 PM
Counting Rows CLamar Excel Discussion (Misc queries) 1 June 15th 06 04:05 PM
Counting rows, then counting values. Michael via OfficeKB.com Excel Discussion (Misc queries) 7 August 4th 05 10:57 PM
Counting Rows Sona Excel Discussion (Misc queries) 0 May 25th 05 03:19 PM


All times are GMT +1. The time now is 08:52 PM.

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

About Us

"It's about Microsoft Excel"