Importing specific areas of a csv file in certain columns

hakantoz

New Member
Joined
Feb 28, 2014
Messages
28
Hello,

I am very new to the excel VBA and using macro and need some help.

I have a software that exports files in csv format and with a format as the following.
[TABLE="width: 380"]
<tbody>[TR]
[TD="width: 380"][/TD]
[/TR]
</tbody>[/TABLE]
PN:NB%SN:7A1350Y00369%MAC:00C0B70000
PN:NB%SN:7A1350Y00329%MAC:00C0B70012
PN:NB%SN:7A1350Y00360%MAC:00C0B70003

I created three columns PN , SN and MAC

And I need to create a button in excel sheet for user to select which file they would like to import (csv or text file) and excel somehow needs to detect and auto sort under the columns PN, SN and Mac automatically with the numbers in the file. It will look something similar like below once they are sorted after the file selection

PN SN MAC
NB 7A1350Y00369 00C0B70000
NB 7A1350Y00329 00C0B70012
NB 7A1350Y00360 00C0B70003


Thank you for all the help
 
Hello VBA Geek,
Again I cannot thank you enough for your help. I sent my comments and the files through your private inbox, let me know if you cannot access the files and I try to share through another source
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
VBA Geek said:
hi


can you also show me what the txt and xls files look like
hello vba geek,
i currently have no examples of any txt file or xls file
what i can tell you though is that they will all have thesame string structure that u can see model serial and mac addresses that we need to pull and organize.
they will be seperated by line by line.

your msg box full i had to send it from here just fyi
 
Upvote 0

Forum statistics

Threads
1,223,270
Messages
6,171,102
Members
452,379
Latest member
IainTru

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top