How to get an Acronym using Excel VBA?

The purpose of the following example of Excel VBA macro is to get the acronym or an abbreviation of each of the first letter of any given words.

Function Acronym(Words As Variant) As String

    Dim aWord() As String, ix As Integer

    aWord = Split(Words.Value, " ")
    For ix = 0 To UBound(aWord)
        Acronym = Acronym & UCase(Left(aWord(ix), 1))
    Next ix

End Function

Using Split function and space as delimiter, we create an array of word. Then using simple for … to loop, we do looping of each word and take the first letter of each word in array using Left function.

By using iteration and array like this, we will get the acronym of the word in question.

We can directly use the function in Excel formula bar with a reference to the cell that contains the collection of words we want to make an acronym from it as input.

acronym

For the details information of each function in use, Split/Ucase/Left, select each function and push F1 while in the Visual Basic Editor.

This entry was posted in Excel Formula and tagged , , , , , , . Bookmark the permalink.

799 Responses to How to get an Acronym using Excel VBA?

  1. Pingback: My Blog

  2. Pingback: carpet cleaning in boston

  3. Pingback: springhills hotel

  4. Pingback: wisdom teeth extraction

  5. Pingback: payday advances

  6. Pingback: open in a new browser window

  7. Pingback: visit same day loans

  8. Pingback: www.easyloanfast.com

  9. Pingback: criminal attorneys

  10. Pingback: Man And A Van London

  11. Pingback: accident lawyers car

  12. Pingback: sacoche homme lacoste

  13. Pingback: rent right property management software

  14. Pingback: remove key scratches from car pricing

  15. Pingback: hcg reviews

  16. Pingback: poker stars chips

  17. Pingback: the link

  18. Pingback: bowmel chrysler review

  19. Pingback: bad credit mobile phones

  20. Pingback: learning to draw dvd

  21. Pingback: rimadyl caplets

  22. Pingback: online quotes

  23. Pingback: Extra resources

  24. Pingback: good web design

  25. Pingback: lecterns

  26. Pingback: ice cream makers reviews

  27. Pingback: follow us on twitter

  28. Pingback: pre construction

  29. Pingback: Creation Site Internet Annecy

  30. Pingback: How to Tie a Tie

  31. Pingback: natural health

  32. Pingback: scrapeboxlist

  33. Pingback: Juegos de furbol

  34. Pingback: jewelry buyer

  35. Pingback: pastry chefs

  36. Pingback: Digital Cameras

  37. Pingback: Software

  38. Pingback: mexican style home

  39. Pingback: Immobilier Concarneau

  40. Pingback: open in a new browser

  41. Pingback: "Saponin

  42. Pingback: freshrankings.com online

  43. Pingback: link

  44. Pingback: casque bluetooth

  45. Pingback: website

  46. Pingback: luxury homes perth

  47. Pingback: event planning template

  48. Pingback: promoting and celebrating Virginia creativity

  49. Pingback: cumming tree service

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>