count and arrange cells have numeric values

  • Thread starter Thread starter amrezzat
  • Start date Start date
A

amrezzat

heloo
suppose i have 2 coloumns like this

2 microsoft
5 intel
3 ge
1 gm
2 microsoft
5 intel
7 tnt
12 att
24 blue
15 ntn

how can i order them AScending in another column
 
copy them to another range, then sort the copy of the data on the column you
wish. If you need code, turn on the macro recorder while you do it
manually.
 
Sub doit()
Range("M1").currentRegion.ClearContents
Range("A1").Resize(10,2).Copy Destination:=Range("M1")
Range("M1").currentRegion.Sort Key1:=Range("M1"), Order1:=xlAscending
End Sub
 
thanks
it works
but i dont want to repeat the numbers
i mean
if i input
1 microsoft
2 intel
1 microsoft
the results will be
1
1
2


i dont want that
i want only
1
2
no repeating
how can i do that
 
rearrange cells based on its numerical values without repeating

--------------------------------------------------------------------------------

thanks
it works
but i dont want to repeat the numbers
i mean
if i input
1 microsoft
2 intel
1 microsoft
the results will be
1
1
2


i dont want that
i want only
1
2
no repeating
how can i do that?
noting that the input my be so long may be 1000 rows
but they are only 50 companies (from 1 to 50)
so the results will be in a max 50 rows

and i want that code to activate(rerun) each time i enter the sheet2

how can i do that ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top