Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Delete in row C if it is repeated in row D

All my searches have lead me to ways to eliminate duplicates in a
column- not what I'm trying to do... If the value in column C is the
same as the value in column D for the same row, I want to erase it. Is
there an easy way to do this? (I think I remember reading about a way
with conditional formatting once.)

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 173
Default Delete in row C if it is repeated in row D

If you just want to hide duplicate values you can use conditional formatting
on values in column C and make the font color white if the value in C matches
the value in D (in conditional format box use "Cell Value is", "equal to",
"=D1" for cell C1 and use the format paintbrush to do the rest of column C).

If you want to actually remove the value from column C you could create a
3rd column (say E), use an "If" statement to compare C and D and then
copy/paste special/value column E back on to column C. The "If" statement in
C1 would look something like "=if(c1=d1,"",c1)"
Will

"calibansfolly" wrote:

All my searches have lead me to ways to eliminate duplicates in a
column- not what I'm trying to do... If the value in column C is the
same as the value in column D for the same row, I want to erase it. Is
there an easy way to do this? (I think I remember reading about a way
with conditional formatting once.)


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 78
Default Delete in row C if it is repeated in row D

There is no possibility to erase the content of a cell with a formula or a
conditional formatting, only a macro can do it. However, you can hide the
content of a cell with conditional formatting, by using white font on white
background.

Select column C, then click on the menu Format Conditional Formatting, then
make sure you have
"Cell Value Is", "Equal To", "=$D1" (without quotes), then click on the
button Format and select white color font.

If you want to erase the content of the cells, then this macro should do it:

Sub DeleteSameValue()

Dim i As Long

For i = 1 To 65536
If Cells(i, "C") = Cells(i, "D") And Cells(i, "C") < "" Then
Cells(i, "C") = ""
End If
Next i

End Sub



calibansfolly wrote:
All my searches have lead me to ways to eliminate duplicates in a
column- not what I'm trying to do... If the value in column C is the
same as the value in column D for the same row, I want to erase it. Is
there an easy way to do this? (I think I remember reading about a way
with conditional formatting once.)


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200707/1

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Delete in row C if it is repeated in row D

Will- this is perfrect. Thanks!


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
delete repeated data in excel Alex Excel Discussion (Misc queries) 2 May 5th 07 11:04 PM
HOW DO I DELETE A REPEATED TIITLE IN THE HOME SECT. OF OUTLOOK? VICKI Excel Discussion (Misc queries) 0 February 1st 06 06:29 PM
Delete repeated Cells Mosqui Excel Worksheet Functions 2 September 13th 05 01:31 AM
delete repeated numbers Labman Excel Worksheet Functions 1 September 10th 05 07:34 PM
Delete repeated numbers in Excel Labman Excel Worksheet Functions 1 September 10th 05 02:24 PM


All times are GMT +1. The time now is 09:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"