LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default counting entities with the same values

If the functions in the freely downloadable file at
http:??home.pacbell.net/beban are available to your workbook, the
following will enter in Cell E1 the number of rows (including the first)
equal to the first row:

Sub test2()
Dim rng As Range, k As Long
Set rng = Range("a1:d7").Rows
For i = 1 To rng.Count
If RowsEqual(rng(1), rng(i + 1)) Then k = k + 1
Next
rng(1).Cells(1, 5).Value = k + 1
End Sub

Alan Beban

solo_razor wrote:
hello,

I want to count rows that contain the same data that is not specified
in any way.

e.g.

a b c d

1 2 3 4
1 2 3 4
2 1 3 4

now i need a formula or code to compare rows and if they match count
the rows and give an output to a specified cell

Thanks



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


 
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
Subordinate entities in Organizational Chart sl128960l5 Charts and Charting in Excel 1 May 20th 10 02:11 PM
Counting values in one cell based on values in another S2 Excel Discussion (Misc queries) 7 April 18th 09 02:46 AM
need chart that displays overlap/duplication between two entities Bsacco Charts and Charting in Excel 1 March 5th 07 12:38 PM
Counting rows, then counting values. Michael via OfficeKB.com Excel Discussion (Misc queries) 7 August 4th 05 10:57 PM
counting entities with the same values zantor[_16_] Excel Programming 1 September 22nd 03 01:13 PM


All times are GMT +1. The time now is 07:21 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"