Help on choosing the right way

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a list of words around 60 on a spreadsheet on the same column, from
them I choose around 40 words on another column. Then manually I type the
other 20 words on another column. This manual way takes ages for me to do my
work everyday.

Using the VBA could you please give me the code so I can do this
automatically? Or some ideas on which commands should I use?
 
You could make it a bit easier manually:
Assuming your names are in column A
- enter a 1 in column B, in front of the names you want to select
- once done, sort A:B by Ascending/orDescending column B:
-select data A:B
-menu Data > Sort, choose to sort by B
Now all the '1' rows are grouped together at the top, ie all selected names
- copy A1:A40: select A1:A40 then menu Edit >Copy
- paste in column C: select C1, then menu Edit > Paste
- copy/paste the same way for A41:A0 to D1

Regards,
Sebastien
 
Assume the 60 words are in A1:A60
assume the 40 words are in B1:B40
put list of 20 in column C

Sub BuildList()
dim rng as range, rng1 as Range
Columns(1).Insert
Range("A1:A60").Formula = "=if(countif($C$1:$C$40,B1)>0,"",na())
Set rng = Range("A1:A60").SpecialCells(xlFormulas,xlErrors)
set rng1 = Intersect(rng.EntireRow,Columns(2))
rng1.copy Destination:=Range("D1")
columns(1).Delete
End Sub
 

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