PC Review


Reply
Thread Tools Rate Thread

Cell Blank if duplicate value in previous cell

 
 
=?Utf-8?B?VG9ueUQ=?=
Guest
Posts: n/a
 
      15th Feb 2007
I want to copy date from one worksheet into another with copy past special as
a "value" from two columns. However if the department is the same in cell B1
as A1 I want B1 to be blank. Is there any one of doing this?

 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmFzb24=?=
Guest
Posts: n/a
 
      15th Feb 2007
You can do this with formulas and a helper column using:

=IF(B1=A1,"",B1)

Then copy down, highlight all formulas, copy, paste special > values.

Or easier, you can just run a macro:

Sub Delete_ColB()
Dim i As Integer
For i = 1 To Cells.SpecialCells(xlCellTypeLastCell).Row
If Cells(i, 2) = Cells(i, 1) Then Cells(i, 2) = ""
Next
End Sub

"TonyD" wrote:

> I want to copy date from one worksheet into another with copy past special as
> a "value" from two columns. However if the department is the same in cell B1
> as A1 I want B1 to be blank. Is there any one of doing this?
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete a row where a cell in the previous row is a duplicate buscdr Microsoft Excel Programming 0 19th May 2009 10:18 PM
need to make cell blank if no data in previous cell Franky Microsoft Excel Programming 1 6th Oct 2007 05:22 AM
Start Cell B1 then find first blank cell, insert subtotal, next non blank, then next blank, sutotal cells in between......... amorrison2006@googlemail.com Microsoft Excel Programming 2 7th Jun 2007 09:27 PM
Need macro to check if cell is not blank & previous cell is blank, copy information from row above & paste JenIT Microsoft Excel Programming 4 12th Apr 2007 08:56 PM
Find last/previous non-blank cell in current column NickDanger Microsoft Excel Worksheet Functions 4 16th May 2004 11:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:05 PM.