![]() |
Code Help ^
Hello, Does anyone have a pre-written code that allows you to change multiple abriviations into words.. Similar to the "Find and Replace" Function but on a grand scale for Entering many abbriviations and words? Thank you for your time, Chase -- ChasePenelli ------------------------------------------------------------------------ ChasePenelli's Profile: http://www.excelforum.com/member.php...o&userid=24619 View this thread: http://www.excelforum.com/showthread...hreadid=382508 |
Code Help ^
Any code would just run the replace all multiple times. So you can turn on
the macro recorder to get the basic code and set up your loop. -- Regards, Tom Ogilvy "ChasePenelli" wrote in message news:ChasePenelli.1raiyh_1119884735.5126@excelforu m-nospam.com... Hello, Does anyone have a pre-written code that allows you to change multiple abriviations into words.. Similar to the "Find and Replace" Function but on a grand scale for Entering many abbriviations and words? Thank you for your time, Chase -- ChasePenelli ------------------------------------------------------------------------ ChasePenelli's Profile: http://www.excelforum.com/member.php...o&userid=24619 View this thread: http://www.excelforum.com/showthread...hreadid=382508 |
Code Help ^
Suggestion: Set up a list (on a new sheet, I will call it "Abbreviations" -
you can delete it later if desired) with two columns; abbreviations in A, actual text you want in B; then: Public Sub AbbrevToText(SearchSheet As Worksheet) Dim ListRange As Range, Abbreviation As Range Set ListRange = Sheets("Abbreviations").Range("A1").CurrentRegion For Each Abbreviation In Intersect(ListRange, Sheets("Abbreviations").Range("A:A").Cells) SearchSheet.UsedRange.Replace Abbreviation.Value, Abbreviation.Range("B1").Value Next Abbreviation End Sub Just run the Sub for any worksheet you want to do the "mass replace" on, e.g. AbbrevToText(ActiveSheet) "ChasePenelli" wrote: Hello, Does anyone have a pre-written code that allows you to change multiple abriviations into words.. Similar to the "Find and Replace" Function but on a grand scale for Entering many abbriviations and words? Thank you for your time, Chase -- ChasePenelli ------------------------------------------------------------------------ ChasePenelli's Profile: http://www.excelforum.com/member.php...o&userid=24619 View this thread: http://www.excelforum.com/showthread...hreadid=382508 |
Code Help ^
Suggestion: Set up a list (on a new sheet, I will call it "Abbreviations" -
you can delete it later if desired) with two columns; abbreviations in A, actual text you want in B; You might want to add some additional columns to address some additional parameters of the Find method, e.g., the LookAt, SearchOrder, and MatchCase. -EW "K Dales" wrote: then: Public Sub AbbrevToText(SearchSheet As Worksheet) Dim ListRange As Range, Abbreviation As Range Set ListRange = Sheets("Abbreviations").Range("A1").CurrentRegion For Each Abbreviation In Intersect(ListRange, Sheets("Abbreviations").Range("A:A").Cells) SearchSheet.UsedRange.Replace Abbreviation.Value, Abbreviation.Range("B1").Value Next Abbreviation End Sub Just run the Sub for any worksheet you want to do the "mass replace" on, e.g. AbbrevToText(ActiveSheet) "ChasePenelli" wrote: Hello, Does anyone have a pre-written code that allows you to change multiple abriviations into words.. Similar to the "Find and Replace" Function but on a grand scale for Entering many abbriviations and words? Thank you for your time, Chase -- ChasePenelli ------------------------------------------------------------------------ ChasePenelli's Profile: http://www.excelforum.com/member.php...o&userid=24619 View this thread: http://www.excelforum.com/showthread...hreadid=382508 |
Code Help ^
If i was familiar with VB and Excel i could easily put your ideas to use, but i really dont know very much about how to do these things... So if anyone is nice enough to put a "plug n play" formula in this post for me that would be great... Thanks Again for everyones help~ Chase -- ChasePenelli ------------------------------------------------------------------------ ChasePenelli's Profile: http://www.excelforum.com/member.php...o&userid=24619 View this thread: http://www.excelforum.com/showthread...hreadid=382508 |
Code Help ^
how would you use this code within a macro to replace old text with new text?
"K Dales" wrote: Suggestion: Set up a list (on a new sheet, I will call it "Abbreviations" - you can delete it later if desired) with two columns; abbreviations in A, actual text you want in B; then: Public Sub AbbrevToText(SearchSheet As Worksheet) Dim ListRange As Range, Abbreviation As Range Set ListRange = Sheets("Abbreviations").Range("A1").CurrentRegion For Each Abbreviation In Intersect(ListRange, Sheets("Abbreviations").Range("A:A").Cells) SearchSheet.UsedRange.Replace Abbreviation.Value, Abbreviation.Range("B1").Value Next Abbreviation End Sub Just run the Sub for any worksheet you want to do the "mass replace" on, e.g. AbbrevToText(ActiveSheet) "ChasePenelli" wrote: Hello, Does anyone have a pre-written code that allows you to change multiple abriviations into words.. Similar to the "Find and Replace" Function but on a grand scale for Entering many abbriviations and words? Thank you for your time, Chase -- ChasePenelli ------------------------------------------------------------------------ ChasePenelli's Profile: http://www.excelforum.com/member.php...o&userid=24619 View this thread: http://www.excelforum.com/showthread...hreadid=382508 |
All times are GMT +1. The time now is 08:17 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com