ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Use of Exact(or other) function for alternate rows? (https://www.excelbanter.com/excel-worksheet-functions/5560-use-exact-other-function-alternate-rows.html)

yusee_ygs

Use of Exact(or other) function for alternate rows?
 
I would like to compare the rows 1 and 2 (names) and have a logical value
returned. Is there a way to do this so that it compares only row 1 and 2, 3
and 4 and not 2 and 3...
I have 1500 rows of the names and I would like see which rows have the exact
names and which dont.
Please guide. Thanks

Kat Warren
Kat Warren
McKenney James
McKenney James
Yelli Albert
Yelli Albert
Green Stephen
Green Stephen
Block Stanley
Block Stanley
Steigbigel Roy
Steigbigel Roy


Don Guillett

Try this to get the exact. Change "e" to suit your column

Sub comparerows()
For i = Cells(Rows.Count, "e").End(xlUp).Row To 1 Step -1
If Cells(i, "e") = Cells(i + 1, "e") Then MsgBox Cells(i + 1, "e").Row
Next
End Sub

--
Don Guillett
SalesAid Software

"yusee_ygs" wrote in message
...
I would like to compare the rows 1 and 2 (names) and have a logical value
returned. Is there a way to do this so that it compares only row 1 and 2,

3
and 4 and not 2 and 3...
I have 1500 rows of the names and I would like see which rows have the

exact
names and which dont.
Please guide. Thanks

Kat Warren
Kat Warren
McKenney James
McKenney James
Yelli Albert
Yelli Albert
Green Stephen
Green Stephen
Block Stanley
Block Stanley
Steigbigel Roy
Steigbigel Roy




N Harkawat

Assuming your values start ar row # 2 (even numbered) use this formula
=IF(MOD(ROW(),2)=0,A2=A3,A1=A2) and fill it down



"yusee_ygs" wrote in message
...
I would like to compare the rows 1 and 2 (names) and have a logical value
returned. Is there a way to do this so that it compares only row 1 and 2,

3
and 4 and not 2 and 3...
I have 1500 rows of the names and I would like see which rows have the

exact
names and which dont.
Please guide. Thanks

Kat Warren
Kat Warren
McKenney James
McKenney James
Yelli Albert
Yelli Albert
Green Stephen
Green Stephen
Block Stanley
Block Stanley
Steigbigel Roy
Steigbigel Roy





All times are GMT +1. The time now is 04:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com