Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I abbreviate words?

I am a data modeller and I need to abbreviate business names into column
names. I have multiple words in a cell that I have to abbreviate by looking
against a dictionary

For example I have Invoice Amount and it needs to be abbreviated to inv_amt.
I have a worksheet containing 2 columns one with the abbreviation and other
with the complete word.

How do I write a macro to convert a long list of business names in to
abbreviated column names? Any advice is appreciated

Regards
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default How do I abbreviate words?

Do you only have one entry in a cell that needs to be abbreviated, or
might you have several words/phrases in a cell that need to be
changed? If the latter, what is the maximum number of words that would
need to be changed? Presumably, if you have any words that are not in
your dictionary then these would remain unchanged?

Depending on your answers to the above, you could think about using
the REPLACE function or the SUBSTITUTE function or even VLOOKUP in a
formula which can be copied down a helper column.

Hope this helps.

Pete

On Aug 15, 5:39*pm, shangud wrote:
I am a data modeller and I need to abbreviate business names into column
names. I have multiple words in a cell that I have to abbreviate by looking
against a dictionary

For example I have Invoice Amount and it needs to be abbreviated to inv_amt.
I have a worksheet containing 2 columns one with the abbreviation and other
with the complete word.

How do I write a macro to convert a long list of business names in to
abbreviated column names? Any advice is appreciated

Regards


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default How do I abbreviate words?

You could start with a formula like this (assuming the long names are in
column A, and we are in row 17 at the moment)

=LEFT(A17,3) & "_" & MID(A17,FIND(" ",A17)+1,3)

The "rules" for that are that there are at least 2 words in the long name
and they are separated by a single space.

But I'd say in a long list, there is a very likely opportunity to replicate
any given abbreviation. You may want an additional helper column to indicate
when a duplicate abbreviation has been created. Again assuming that your
long list starts on row 17 and that the formula I showed earlier is in column
B, then in column C you could put this formula into C17 and fill it down to
indicate when duplicate abbreviations have been created:
=IF(COUNTIF(B$17:B17,B17)1,"DUPLICATED","")
That will display the word "DUPLICATED" anytime the abbreviation on that row
has already been used in a lower numbered row above it.

If you want to turn your formulas that created the abbreviations in column B
into "hard" values after you've developed them and cleaned them up to remove
duplicates, you can select the entire list and use
Edit | Copy
followed by (without unselecting the list)
Edit | Paste Special and making sure the "Values" option is selected. That
will replace the formulas with the results in column B.

"shangud" wrote:

I am a data modeller and I need to abbreviate business names into column
names. I have multiple words in a cell that I have to abbreviate by looking
against a dictionary

For example I have Invoice Amount and it needs to be abbreviated to inv_amt.
I have a worksheet containing 2 columns one with the abbreviation and other
with the complete word.

How do I write a macro to convert a long list of business names in to
abbreviated column names? Any advice is appreciated

Regards

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
Abbreviate [Number] Billions to [#] Bn Jarod Excel Discussion (Misc queries) 4 April 24th 23 11:46 AM
how to convert numeric to words Example 525 in words (Twenty five Ganta Amar Nath Excel Discussion (Misc queries) 2 July 17th 08 10:21 AM
I am trying to abbreviate text in my description column. Antonio Excel Worksheet Functions 3 February 28th 07 01:56 AM
Can I abbreviate one value in a data series? CMEknit Charts and Charting in Excel 2 June 16th 06 03:14 PM
how do i insert words into a column without erasing the words soccer5585 Excel Discussion (Misc queries) 0 June 8th 05 11:06 PM


All times are GMT +1. The time now is 04:18 AM.

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"