View Single Post
  #6  
Old March 10th, 2005, 01:47 PM
Adam
external usenet poster
 
Posts: n/a
Default

thanks, problem solved!

"Naomi" skrev:

Sorry! - just pasted in some code from somewhere else and posted by mistake!!

Should be more like

Dim i as integer
i = 5 (the row where your values begin)

Do until cells(i,1).value = "" (as long as your data is in column 1)

if cells(i,1)=cells(i+1,1) then
else
cells(i,1).copy
cells(i,5).pastespecial xlvalues (this pastes into column E)
endif
i=i+1

loop
Range("E5:E1000").sort Key1:=Range("E5"), Order1:=xlAscending


You could develop this macro a lot further to keep it in order etc.....



cells(i,1).copy
with selection
.Copy
.Insert Shift:=xlDown
end with
cells(i,1)=(i-id)+1
cells(i+1,1)=(i-id)+2
i = i+2
loop


"Naomi" wrote:

Dim i as integer
i = 5 (the row where your values begin)

Do until cells(i,1).value = "" (as long as your data is in column 1)
cells(i,1).copy
with selection
.Copy
.Insert Shift:=xlDown
end with
cells(i,1)=(i-id)+1
cells(i+1,1)=(i-id)+2
i = i+2
loop
You will need to write a macro. Something like-



"Adam" wrote:

Thanks, and if I would like to use a formula?

"Naomi" skrev:

The simplest way, if you are only doing this once, is to use the advanced
filter. DataFilterAdvanced filter then follow the wizard but make sure that
you tick 'unique records only'.

"Adam" wrote:

I have a column with many different supplier, with some of the occuring many
times e.g.

Column A
Supplier A
Supplier A
Supplier B
Supplier C
Supplier C
Supplier C
Supplier D etc etc.

How do I make a list with all the supplier, occuring only once if I do not
want to use the pivot table?