Macros to Rearrange Data??

T

taimysho0

Hello im new to macros and was wondering if I could get some help

I have a file that is in txt format. When I load this file into excel
it lists all the rows of information under one column (attachment calle
sample.xls). I need a macros that will reorganize this column in
certain order. I have attached an example of the text file calle
sample2.txt (keep inm ind that this text file's order will change and i
not always static, depending on the file, but it will always be in tex
format). Ive also included a sample of what the output should look like
but is in a .txt format but the arrangement is what im looking for wit
the proper value its associated with

Thanks!

**i also have to do some name conversions. For example if i hav
"Country Code" on the excel spreadsheet, i want to reorganize it in th
order as the text file attached but also rename it t
"Merchant_country_code" for example

**Also, there are some rows on the excel file that are unecessary, ho
would i delete these rows in the macros




***im nto sure if the excel file uploaded okay, but im pasting the dat
below

XXXXXXXXX

XXXXXXX
XXXXXXXXXXXXXX

Customer Service: 1-800-888-888
Merchant Name BLAH BLAH BLA
INC Terminal Number 111
Merchant Terminal TID 111111
DBA City CityVill
DBA State OO
DBA Zip 5555
DBA Phone 1800-888-888
Daylight Savings No
SIC 111
Industry E-Commerce
Country Code 11
Debit No
Currency Code 11
Merchant Agent 111
Language 00
Sharing Group
Agent Number 00001
Chain Number 000001
MID 12345678901123
Store Number 1234
Merchant Location Number 1234








+-------------------------------------------------------------------
|Filename: sample2.txt
|Download: http://www.excelbanter.com/attachment.php?attachmentid=719
+-------------------------------------------------------------------
 
I

isabelle

hi taimysho0,

you forget to tell us which way you want to arrange the data, the two
joints files are identical

isabelle
 
T

taimysho0

isabelle;1608307 said:
hi taimysho0,

you forget to tell us which way you want to arrange the data, the two
joints files are identical

isabelle

Hello isabelle,

Thanks for replying, im sorry i must have not uploaded the file
correctly. In the excel file it looks like this: (only 1 column)

XXXXXXXXXX

XXXXXXXX
XXXXXXXXXXXXXXX


Customer Service: 1-800-888-8888
Merchant Name BLAH BLAH BLAH
INC Terminal Number 1111
Merchant Terminal TID 1111111
DBA City CityVille
DBA State OO
DBA Zip 55555
DBA Phone 1800-888-8888
Daylight Savings No
SIC 1111
Industry E-Commerce
Country Code 111
Debit No
Currency Code 111
Merchant Agent 111
Language 00
Sharing Group
Agent Number 000011
Chain Number 0000011
MID 123456789011234
Store Number 12345
Merchant Location Number 12345



I need a macros to run in excel to rearrange the above to look lik
below, however there are some extra rows in the above column that doesn
exist in the below arrangement, so if it does not have a match, i
should be deleted:




bank_number:
chain_number:
bin:
category_code:
merchant_city:
merchant_country_code:
merchant_currency_code:
merchant_id:
merchant_location_number:
merchant_name:
merchant_state:
merchant_store_id:
merchant_svc_phone:
merchant_v_number:
merchant_zip_code:
usd_terminal_id:










+-------------------------------------------------------------------
+-------------------------------------------------------------------
 

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

Top