#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default IF statements

How do I use an IF statement to look at a column of data and if the current
value or text is repeated in that column to return a null or NA value?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default IF statements

This is slightly different than what you described, but it may be more in
sync with what you are looking for:
http://www.cpearson.com/excel/Duplicates.aspx


Hope that helps,
Ryan--



--
RyGuy


"Dwain Kincaid" wrote:

How do I use an IF statement to look at a column of data and if the current
value or text is repeated in that column to return a null or NA value?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default IF statements

I'm not entirely clear what you want displayed. If we display a "null" for
duplicates, then what do we display for unique entries. The formula below
assumes we will show unique items and show nothing for an items that are not
unique...

=IF(COUNTIF(A:A,"="&A1)=1,A1,"")

Here I have assumed your data is in Column A.

Rick


"Dwain Kincaid" <Dwain wrote in message
...
How do I use an IF statement to look at a column of data and if the
current
value or text is repeated in that column to return a null or NA value?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default IF statements

I keep forgetting that you don't need the "=" part for text constants. This
will also work...

=IF(COUNTIF(A:A,A1)=1,A1,"")

Rick


"Rick Rothstein (MVP - VB)" wrote in
message ...
I'm not entirely clear what you want displayed. If we display a "null" for
duplicates, then what do we display for unique entries. The formula below
assumes we will show unique items and show nothing for an items that are
not unique...

=IF(COUNTIF(A:A,"="&A1)=1,A1,"")

Here I have assumed your data is in Column A.

Rick


"Dwain Kincaid" <Dwain wrote in message
...
How do I use an IF statement to look at a column of data and if the
current
value or text is repeated in that column to return a null or NA value?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default IF statements

Rick:

Actually I want the first instance of a duplicate to show up and then any
repeats to either show null of "".

"Rick Rothstein (MVP - VB)" wrote:

I keep forgetting that you don't need the "=" part for text constants. This
will also work...

=IF(COUNTIF(A:A,A1)=1,A1,"")

Rick


"Rick Rothstein (MVP - VB)" wrote in
message ...
I'm not entirely clear what you want displayed. If we display a "null" for
duplicates, then what do we display for unique entries. The formula below
assumes we will show unique items and show nothing for an items that are
not unique...

=IF(COUNTIF(A:A,"="&A1)=1,A1,"")

Here I have assumed your data is in Column A.

Rick


"Dwain Kincaid" <Dwain wrote in message
...
How do I use an IF statement to look at a column of data and if the
current
value or text is repeated in that column to return a null or NA value?






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default IF statements

Then give this formula a try...

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

Rick


"Dwain Kincaid" wrote in message
...
Rick:

Actually I want the first instance of a duplicate to show up and then any
repeats to either show null of "".

"Rick Rothstein (MVP - VB)" wrote:

I keep forgetting that you don't need the "=" part for text constants.
This
will also work...

=IF(COUNTIF(A:A,A1)=1,A1,"")

Rick


"Rick Rothstein (MVP - VB)" wrote in
message ...
I'm not entirely clear what you want displayed. If we display a "null"
for
duplicates, then what do we display for unique entries. The formula
below
assumes we will show unique items and show nothing for an items that
are
not unique...

=IF(COUNTIF(A:A,"="&A1)=1,A1,"")

Here I have assumed your data is in Column A.

Rick


"Dwain Kincaid" <Dwain wrote in
message
...
How do I use an IF statement to look at a column of data and if the
current
value or text is repeated in that column to return a null or NA value?




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF statements

"Dwain Kincaid" wrote:
How do I use an IF statement to look at a column of data and if the current
value or text is repeated in that column to return a null or NA value?


One way
Assuming data to be looked at is running in A1 down
you could put in say, B1:
=IF(A1="","",IF(COUNTIF(A:A,A1)1,"",A1))
and copy down to the max expected extent of data in col A
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
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
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
More than 7 IF(AND) statements alexm999 Excel Discussion (Misc queries) 3 August 12th 05 12:00 PM
IF statements cb3291u Excel Discussion (Misc queries) 1 August 5th 05 03:42 PM
If Statements... Delaina Excel Discussion (Misc queries) 4 August 1st 05 10:29 PM
If Statements - how to do is like '%value%' Amanda Guenthner Excel Worksheet Functions 5 June 5th 05 02:44 AM


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