Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default populate unique entries to txt file


dear all,
I am new to VBA and i am currently need to have a macros to populat
unique entries into an txt file.

Spreasheet (A1 column)
-----------
aaaaa_1
aaaaa_2
bbbbb_1
ccccc_3
ccccc_1

i wish to populate the above datas into a txt file with this result:

result.txt
--------
aaaaa
bbbbb
ccccc

Can anyone help on this

--
ymeya
-----------------------------------------------------------------------
ymeyaw's Profile: http://www.excelforum.com/member.php...fo&userid=3442
View this thread: http://www.excelforum.com/showthread.php?threadid=54235

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default populate unique entries to txt file

maybe it is a lot easier to transfer the data to ACCESS, strip it,
group it and export it.

Good luck,
Peter

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default populate unique entries to txt file


hi,
basically i had few funtions in VBA excel. This is just part of
functions of my VBA.That's why i need to do this in excel. :(


--
ymeyaw
------------------------------------------------------------------------
ymeyaw's Profile: http://www.excelforum.com/member.php...o&userid=34421
View this thread: http://www.excelforum.com/showthread...hreadid=542354

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default populate unique entries to txt file

I'd try this manually to see if it worked. Then if it did, record a macro when
I did it for real.

copy column A to a worksheet in a new workbook
Add a header row to A1 of that new worksheet
select column A
edit|replace
what: _* (underscore, asterisk)
with: (leave blank)
replace all

Then use data|filter|advanced filter to extract the unique values into column B.
Delete column A
delete the header in A1 (it moved from B1 when column A was deleted
Sort that column (if you want)

Save that file as .txt
close without saving

Open the file in NotePad to see if it worked ok.

Debra Dalgleish shows how to extract those unique values manually:
http://www.contextures.com/xladvfilter01.html#FilterUR

ymeyaw wrote:

dear all,
I am new to VBA and i am currently need to have a macros to populate
unique entries into an txt file.

Spreasheet (A1 column)
-----------
aaaaa_1
aaaaa_2
bbbbb_1
ccccc_3
ccccc_1

i wish to populate the above datas into a txt file with this result:

result.txt
--------
aaaaa
bbbbb
ccccc

Can anyone help on this?

--
ymeyaw
------------------------------------------------------------------------
ymeyaw's Profile: http://www.excelforum.com/member.php...o&userid=34421
View this thread: http://www.excelforum.com/showthread...hreadid=542354


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate formula results in cells to next unique result. VBA or Fu Sandy Crowley Excel Worksheet Functions 2 December 9th 08 07:43 PM
Populate a spreadsheet with multiple entries from a master jdall Excel Discussion (Misc queries) 1 April 6th 06 12:31 AM
Populate combo box with unique values only sjayar Excel Discussion (Misc queries) 1 November 7th 05 07:29 AM
how to populate a combobox with a list of unique values? RIOSGER Excel Programming 2 August 9th 05 04:16 AM
Populate unique list in combobox Mark Excel Programming 3 July 26th 05 09:27 AM


All times are GMT +1. The time now is 10:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"