ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula for comparing rows in a column (https://www.excelbanter.com/excel-discussion-misc-queries/62859-formula-comparing-rows-column.html)

TotallyConfused

Formula for comparing rows in a column
 
Can someone please help with this this formula? I am trying to comparing if
there are dupes in a column. (=IF(A2=A1,1,0)). Any help will be greatly
appreciated. thank you.

Peo Sjoblom

Formula for comparing rows in a column
 
=IF(COUNTIF($A$1:$A$100,A1)1,"Dup","Not Dup")

copy down


--

Regards,

Peo Sjoblom

"TotallyConfused" wrote in
message ...
Can someone please help with this this formula? I am trying to comparing

if
there are dupes in a column. (=IF(A2=A1,1,0)). Any help will be greatly
appreciated. thank you.




Pete

Formula for comparing rows in a column
 
You will need to sort the data in column A for this formula to work.
You do not need brackets around the formula, i.e. it should be:

=IF(A2=A1,1,0)

You should enter this formula into cell B2 and then copy it down the
column - the easiest way is to double-click the "fill handle", which is
the small square at the bottom right corner when the selected cell is
B2. You should then apply autofilters - Data | Filter | Autofilter
(check) - and select 0 for the column B filter - this will show only
the unique values in column A. Highlight the values displayed, then
copy them to another location (e.g. below your data), and you will have
your unique values.

Another way of doing this is to use Filter | Advanced Filter, as here
you can select Unique records and decide to filter in place or to copy
them elsewhere.

Hopt this helps,

Pete


TotallyConfused

Formula for comparing rows in a column
 
Thank you very much. This helped so much! Have a great day!

"Pete" wrote:

You will need to sort the data in column A for this formula to work.
You do not need brackets around the formula, i.e. it should be:

=IF(A2=A1,1,0)

You should enter this formula into cell B2 and then copy it down the
column - the easiest way is to double-click the "fill handle", which is
the small square at the bottom right corner when the selected cell is
B2. You should then apply autofilters - Data | Filter | Autofilter
(check) - and select 0 for the column B filter - this will show only
the unique values in column A. Highlight the values displayed, then
copy them to another location (e.g. below your data), and you will have
your unique values.

Another way of doing this is to use Filter | Advanced Filter, as here
you can select Unique records and decide to filter in place or to copy
them elsewhere.

Hopt this helps,

Pete




All times are GMT +1. The time now is 06:36 AM.

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