LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Deleting cells in a column ref a different column


I've tried searching for a solution without success (probably using th
wrong key phrases)

I have a numbers in column A (4434)
And I have numbers in column C (389)

I wish for any number in column C that is duplicated in column A to b
deleted from column A.

I've tried messing around with:

Sub rem_dup_test()
'
' rem_dup_test Macro
' Macro recorded 15/12/2005 by PreeceJ
'

'
Application.ScreenUpdating = False


Dim lastrow As Long, i As Long, l As Long
Dim DupNum As Range, MainColumn As Range

lastrow = Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To lastrow
For l = 1 To lastrow

Set DupNum = Cells(i, "C")
Set MainColumn = Cells(i, "A")
If MainColumn = DupNum Then Selection.Delete Shift:=xlUp
Next l
Next i

End Sub

but it doesn't even come close :(

Any advice please

--
Damin
-----------------------------------------------------------------------
Daminc's Profile: http://www.excelforum.com/member.php...fo&userid=2707
View this thread: http://www.excelforum.com/showthread.php?threadid=49382

 
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
Formatting Cells and then deleting the reference column Donna[_2_] Excel Worksheet Functions 3 May 2nd 09 04:56 PM
deleting rows with blank cells after a specified column? MYR Excel Discussion (Misc queries) 3 January 9th 09 09:13 PM
Deleting Duplicate Cells in one Column. Jamie Excel Discussion (Misc queries) 6 November 20th 07 04:40 PM
Deleting partial information from all cells in a column Smooney Excel Worksheet Functions 4 August 17th 07 02:11 AM
Deleting blank cells in a column KatyLady Excel Discussion (Misc queries) 6 May 30th 05 03:47 PM


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