View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
pretextat pretextat is offline
external usenet poster
 
Posts: 1
Default I need a VB script for Excel


Well I think I need one..

It's when you are in trouble that you discovers forum like here. I hope
someone can help and that I will also be able to help people in the
future. BTW sorry for my english its not my mother tongue

My problem:

I have two files:

file1.xls with A1 column numbered as below:
1
2
3
4
5
6
7
8
...

file2.xls with A1 column numbered as below:
1
2
3
7
8
15
28
...

Now what I need is a script that compares the two files and deletes the
numbers from file1.xls that are not present in file2.xls (from the
example above: 4,5,6,9,10,11,12,13,14,16...). So in the end file1.xls
and file2.xls would have the same number of row. Please take note that
file1.xls has a total of 8 columns and file2.xls 12 columns. File1.xls
have around 2000 rows and file2.xls around 1200 rows.

Anyone can help, please? Any other solution is welcome.

I know how to use a VB script in Excel with one single file. Is it
different when the script involves two files. Please give me some
explanations just in case I have problems using it.

Thanks in advance


--
pretextat
------------------------------------------------------------------------
pretextat's Profile: http://www.excelforum.com/member.php...o&userid=36512
View this thread: http://www.excelforum.com/showthread...hreadid=562698