Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jat jat is offline
external usenet poster
 
Posts: 33
Default remove duplicates except blanks

is it possible to have a macro that removes duplicates except blanks in a
column?

jat

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,533
Default remove duplicates except blanks

It is not a problem, but we need more information.

Which column do you want to compare, should both entries be deleted?

Regards,
Per

"jat" skrev i meddelelsen
...
is it possible to have a macro that removes duplicates except blanks in a
column?

jat


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default remove duplicates except blanks

With data in ColA try the below macro which will use ColB as a helper column...

Sub Macro1()
Columns(1).Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, Orientation:=xlTopToBottom
Columns(1).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("B1"), Unique:=True
Columns(1).Value = Columns(2).Value
Columns(2).Value = ""
End Sub

--
Jacob


"jat" wrote:

is it possible to have a macro that removes duplicates except blanks in a
column?

jat

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
remove blanks using formula Gotroots Excel Worksheet Functions 5 December 9th 09 11:52 AM
Lookup missing number(s) in column w/blanks & duplicates Excel-User-RR Excel Worksheet Functions 3 February 20th 09 06:06 PM
Condense list (remove blanks) socram Excel Worksheet Functions 2 March 10th 07 01:27 AM
Concatenate and remove blanks PeterW Excel Worksheet Functions 3 January 19th 06 07:04 PM
Can I remove blanks from a range without using sort? Hugh Murfitt Excel Discussion (Misc queries) 6 March 8th 05 09:37 AM


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