How to... with macro?

D

Davor ®upaniæ

sheet1 in excel file named "738.xls" (like value in cell C1), look like
this:

A
B C
1
738
2
3 ABCD sdkljfh 123456 askdjfhl aksjdhfl akjsdfhl aksjdfh lakjsdhf laksjdhf
lkasjdhflaksjdfhlaks
4 Textxxx xxxxx xxx xx xxxxxx TEXTABC xxxxxx x x xxxxx xxxxx xxxx.
098/858-747
5
6 ABCD sdkljfh 123456 askdjfhl aksjdhfl akjsdfhl aksjdfh lakjsdhf laksjdhf
lkasjdhflaksjdfhlaks
7 Textxxx xxx xxxxx xxx xx TEXTABC xxxxxx xxxxxx x x xxxxx xxxxx xxxx.
Tel. 091/571-6232, 098/814-671
8
9 ABCD sdkljfh 123456 askdjfhl aksjdhfl akjsdfhl aksjdfh lakjsdhf laksjdhf
lkasjdhflaksjdfhlaks
10 Textxxx xxxxx xxx xx xxxxxx xxxxxx x x xxxxx xxx xxxxx xxxx xxxx xxxx.
Tel. 091/3300-044
11
12 ABCD sdkljfh 123456 askdjfhl aksjdhfl akjsdfhl aksjdfh lakjsdhf laksjdhf
lkasjdhflaksjdfhlaks
13 Textxxx xxxxx xxx xx xxxxxx xxxxxx x x xxxxx xxxxx xxxx. Tel. 031/377-471
14
15 ABCD sdkljfh 123456 askdjfhl aksjdhfl akjsdfhl aksjdfh lakjsdhf laksjdhf
lkasjdhflaksjdfhlaks
16 Textxxx xxxxx xxx xx xxxxxx xxxxxx x x xxxxx xxxxx xxxx. Tel.
091/3300-044
..
..
..

Macro need to do the following:
1. look for the duplicate of phone number (etc. string of cell A4, A7,
A10... A10000) - where the phone number is in format
031/xxx-xxx or
032/xxx-xxx or
033/xxx-xxx or
034/xxx-xxx or
035/xxx-xxx or
098/xxx-xxx or
098/xxxx-xxx or
098/xxx-xxxx or
091/xxx-xxxx or
091/xxxx-xxx
and delete the row with original and duplicate (etc. A10 and A16) - with one
row above and one row below.

2. look for the duplicate of entire cell (A4, A7, A10... A10000) in excel
file named - value of cell C1 decreased by 1 - etc. this file is named
"738.xls" and search in "737.xls" - and delete the row with duplicate value
(etc. A13 exists in file "737.xls" also in sheet1 in some diferent row) -
with one row above and one row below.

Macro2 need to do the following:
1. after "click" on command button1 open a dialog window where is typed a
text (etc. "TEXTABC" - like part of cell A4 and A7), search for the cells
with that string and also delete row with found value (etc. A4 and A7) -
with one row above and one row below.


Help!

D.
 

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

Similar Threads

Find duplicate string 1
Find duplicate 0
How...? 0
would love help creating a macro to insert information 3

Top