Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Is there an easy way to replace list A instances with list B instances (sorted lists).


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Is there an easy way to replace list A instances with list B instances (sorted lists).

copy list B and paste it on top of List A

or
Use the vlookup formula

Depends on what you mean by replace and what you data looks like.

--
Regards,
Tom Ogilvy

"kkip" wrote in message
...



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Is there an easy way to replace list A instances with list B instances (sorted lists).

Thanks Tom, I'm a newbie to this group, and am trying to figure out how to post as well as how to use Excel. I'm used to UNIX (where I know just about enough to be dangerous to myself).
So... I have 2 columnar lists. Of course, I can copy and paste them into 1 file to build a macro, or whatever.
Here is an exampl

(list 1) (list 2
1
2
3 hl
rtl gb
dog ca
11 pi
fig do

I have a separate text file in which I have strings from list 1 which I wish to change to strings from list 2. In this example, I would want the text "1 rtl this is a silly example fig 11" to be changed to "a gbc this is a silly example dog pig". In addition, I would want any of the exact strings replaced globally (throughout the file).
Is the answer to create a macro to do the first substitution, and then edit the macro to populate it with my strings of both lists? I get line breaks in inconvenient locations in the macro editor - do they matter? It seems cumbersome. This is something that I and several other people will be doing repeatedly with different lists, so simplicity is desired
Thanks in advance
Ke




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Is there an easy way to replace list A instances with list B instances (sorted lists).

I would open the text file in Excel. then use the Built in Edit=Replace on
the entire sheet, with the macro recorder turned on. Then you can modify
the code to loop through your list1 and repeate the Replace using your
pairs of strings.

--
Regards,
Tom Ogilvy

"kkip" wrote in message
...
Thanks Tom, I'm a newbie to this group, and am trying to figure out how to

post as well as how to use Excel. I'm used to UNIX (where I know just about
enough to be dangerous to myself).
So... I have 2 columnar lists. Of course, I can copy and paste

them into 1 file to build a macro, or whatever.
Here is an example

(list 1) (list 2)
1 a
2 g
3 hlk
rtl gbc
dog cat
11 pig
fig dog

I have a separate text file in which I have strings from list 1 which I

wish to change to strings from list 2. In this example, I would want the
text "1 rtl this is a silly example fig 11" to be changed to "a gbc this is
a silly example dog pig". In addition, I would want any of the exact strings
replaced globally (throughout the file).
Is the answer to create a macro to do the first substitution, and then

edit the macro to populate it with my strings of both lists? I get line
breaks in inconvenient locations in the macro editor - do they matter? It
seems cumbersome. This is something that I and several other people will be
doing repeatedly with different lists, so simplicity is desired.
Thanks in advance.
Ken








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
Finding Multiple Instances in a List [email protected] Excel Worksheet Functions 1 April 27th 09 06:37 PM
Create list of unique instances from list of multiple Instances Dishon Excel Worksheet Functions 0 March 3rd 08 10:46 AM
count different instances in a list mmatz Excel Discussion (Misc queries) 3 November 28th 07 08:04 PM
Multiple instances of a named range, not in the list DaveO[_2_] Excel Discussion (Misc queries) 4 April 16th 07 10:34 PM
counting unique instances of text in a list WadeSansing Excel Worksheet Functions 5 June 1st 05 06:57 PM


All times are GMT +1. The time now is 03:12 PM.

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

About Us

"It's about Microsoft Excel"