![]() |
counting entities with the same values
Hi solo_razor,
You can use the 'Correl' function. If two rows are the same then it returns '1'. Something like this: Dim RCorr,NumOfSameRows as integer RCorr = Application.WorksheetFunction.Correl(Rows(i), Rows(p)) If RCorr = 1 Then NumOfSameRows = NumOfSameRows + 1 End If ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
counting entities with the same values
when I had text in the rows it returned #DIV/0
Just for information. -- Regards, Tom Ogilvy "zantor" wrote in message ... Hi solo_razor, You can use the 'Correl' function. If two rows are the same then it returns '1'. Something like this: Dim RCorr,NumOfSameRows as integer RCorr = Application.WorksheetFunction.Correl(Rows(i), Rows(p)) If RCorr = 1 Then NumOfSameRows = NumOfSameRows + 1 End If ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 12:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com