Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Cell Blank if duplicate value in previous cell

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 367
Default Cell Blank if duplicate value in previous cell

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
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
How can I copy a value from a cell and paste it into another cell while adding it to the previous value in that cell [email protected] Excel Worksheet Functions 2 November 7th 07 09:39 AM
Searching for blank cell and populating based on previous data AZ Analog Excel Programming 1 October 30th 06 10:36 PM
Remove Civic numbers in Street Address, move to previous blank cell Canuck Excel Worksheet Functions 1 October 12th 06 03:31 PM
auto populate cell based on previous cell drop down list selectio. PuzzledbyLists Excel Discussion (Misc queries) 2 September 11th 06 01:28 AM
How would I fill blank cells with the data from a previous cell? Clive Darling Excel Discussion (Misc queries) 3 January 6th 05 01:10 AM


All times are GMT +1. The time now is 01:50 AM.

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"