ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Macro using vb script (https://www.excelbanter.com/excel-programming/320256-excel-macro-using-vbulletin-script.html)

lillian

Excel Macro using vb script
 
I have two excel spreed sheet, one call subnet.xls, it has three fields. it
has about 300 rows, as following:
ColumnA ColumnB ColumnC
Ipaddress, gateway, subnet
192.168.1.100 192.168.1.1 255.255.0.0
--- .101 " "


the other excel spreed sheet is call all.xls, it has 6 different
worksheet(sheet1,sheet2,sheet3,sheet4,sheet5,sheet 6)
ColumnA ColumnB ColumnC ColumnD COlumnE
abc ddd fff xxx 192.168.1.100

I need to know how to write the vb.net, the condition as following:
if subnet.xls of columnA Ip address is equal to all.xls of columnE, then I
need to move gateway, subnet to all.xls after column H.
so the answer will be like this:
A B C D E F G
--- --- --- --- 192.168.1.100 192.168.1.1 255.255.0.0

so it has loop in the all.xls 6 times.

I really aprreciated all your kindness help.

Lillian






Jim Thomlinson[_3_]

Excel Macro using vb script
 
A couple of quick questions...

Is this something that you need to do on a regular basis or is this more of
a one
time thing.

Why Excel. Make these into 2 seperate tables in Access and link them on the
IP.

Why 2 seperate spreadsheets. Copy the sheets into one workbook and just do a
Vlookup to combine the results.

RSVP

"Lillian" wrote:

I have two excel spreed sheet, one call subnet.xls, it has three fields. it
has about 300 rows, as following:
ColumnA ColumnB ColumnC
Ipaddress, gateway, subnet
192.168.1.100 192.168.1.1 255.255.0.0
--- .101 " "


the other excel spreed sheet is call all.xls, it has 6 different
worksheet(sheet1,sheet2,sheet3,sheet4,sheet5,sheet 6)
ColumnA ColumnB ColumnC ColumnD COlumnE
abc ddd fff xxx 192.168.1.100

I need to know how to write the vb.net, the condition as following:
if subnet.xls of columnA Ip address is equal to all.xls of columnE, then I
need to move gateway, subnet to all.xls after column H.
so the answer will be like this:
A B C D E F G
--- --- --- --- 192.168.1.100 192.168.1.1 255.255.0.0

so it has loop in the all.xls 6 times.

I really aprreciated all your kindness help.

Lillian






lillian

Excel Macro using vb script
 
Can someone show me how to do the vb script?

Your help always appreciate it.

Lillian

"Lillian" wrote:

I have two excel spreed sheet, one call subnet.xls, it has three fields. it
has about 300 rows, as following:
ColumnA ColumnB ColumnC
Ipaddress, gateway, subnet
192.168.1.100 192.168.1.1 255.255.0.0
--- .101 " "


the other excel spreed sheet is call all.xls, it has 6 different
worksheet(sheet1,sheet2,sheet3,sheet4,sheet5,sheet 6)
ColumnA ColumnB ColumnC ColumnD COlumnE
abc ddd fff xxx 192.168.1.100

I need to know how to write the vb.net, the condition as following:
if subnet.xls of columnA Ip address is equal to all.xls of columnE, then I
need to move gateway, subnet to all.xls after column H.
so the answer will be like this:
A B C D E F G
--- --- --- --- 192.168.1.100 192.168.1.1 255.255.0.0

so it has loop in the all.xls 6 times.

I really aprreciated all your kindness help.

Lillian







All times are GMT +1. The time now is 01:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com