Format MAC addresses in cells by adding colon symbol in Excel
Imagine you have a worksheet filled with a list of alphanumeric strings, and your goal is to transform each alphanumeric value in these strings into MAC addresses by inserting colons, as illustrated in the following screenshot. How can you efficiently achieve this? This tutorial provides straightforward methods to help you tackle this challenge.
Format number and text as mac address with formula
Easily format number and text as mac address with Kutools for Excel
Format number and text as mac address with VBA
Format number and text as mac address with formula
- Select a blank cell, enter the following formula and then press the Enter key to get the first result. See screenshot: Note: In the formula, A2 is the first cell in the list of strings to be formatted as mac format.
- Select the first result cell, drag its Fill Handle down to get the rest of mac addresses. See screenshot:
Easily format number and text as mac address with Kutools for Excel
The formula provided in the method above does not look very easy to grasp. If you are looking for a simpler solution, then the Add Text utility of Kutoos for Excel is highly recommended. Using this utility, you can easily add colons to cells at specified positions to quickly format the string in those cells as MAC addresses. Please follow the steps below.
- Select the cells that contain the strings that need to be formatted as mac addresses.
- Enter a colon in the Text box.
- Select the Specify position option, and then enter the numbers that represent the locations where you want to add the colons. Tip: In this case, I need to add a colon after every two numbers in cells, so I enter 2, 4, 6, 8 and 10 separated by commas. See screenshot:
- Click the OK button.
Result
Strings in the selected cells are now formatted as mac address as shown in the screenshot below.
- The Preview box generates a preview of the results to help you see them in advance.
- To use this feature, you should install Kutools for Excel first, please click to download and have a free trial now.
- This feature collects other useful options, to know more about this feature, please visit this page: Quickly add text or character to multiple cells in Excel.
- This feature can handle multiple ranges at the same time.
Format number and text as mac address with VBA
You also can apply VBA code to format number and text as mac address in Excel. Please do as follows.
- Press the Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.
- In the Microsoft Visual Basic for Applications window, click Insert > Module. Then copy below VBA code into the new Module code window. VBA code: Format numbers as mac addresses in cells
- In the opening Kutools for Excel dialog box, select the cells that contain the strings you want to format as mac address, and then click the OK button.
Then you can see the selected cells are formatted as mac address as shown in the screenshot below.
Related articles:
- How to add text in middle of selected cells in Excel?
- How to add comma at end of cell/text in Excel?
- How to add a character before each word in a cell in Excel?
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
All Kutools add-ins. One installer
Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.





- All-in-one suite ā Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
- One installer, one license ā set up in minutes (MSI-ready)
- Works better together ā streamlined productivity across Office apps
- 30-day full-featured trial ā no registration, no credit card
- Best value ā save vs buying individual add-in