=TEXT(A1,"0000")
However the TEXT function is able to do other fancy stuff like date formating, aswell.
More Related Contents:
- How to avoid using Select in Excel VBA
- Cycle through sub-folders and files in a user-specified root directory [duplicate]
- Convert Text to Date?
- Run Excel Macro from Outside Excel Using VBScript From Command Line
- Importing text file into excel sheet
- Loop through each cell in a range of cells when given a Range object
- Checking for #N/A in Excel cell from VBA code
- Non-web SQL Injection
- VBA Shell function in Office 2011 for Mac
- Check if value exists in column in VBA
- Excel vba refresh wait
- hiding formulas in formula bar
- How to delete multiple rows without a loop in Excel VBA
- Excel vba to create every possible combination of a Range
- How to create an Excel File with Nodejs?
- reading Excel Open XML is ignoring blank cells
- Run a Macro from Another Workbook
- Can’t get all excel processes to stop when closing through Powershell
- Sorting a dictionary by key in VBA
- Handle “No cells were found” error when filtered range is empty
- VBA paste as values – how to
- Excel: the Incredible Shrinking and Expanding Controls [closed]
- Excel: Search for a list of strings within a particular string using array formulas?
- What are the benefits of using Classes in VBA? [closed]
- Writing a VLOOKUP function in vba
- Generate Word Documents (in Excel VBA) from a series of Document Templates
- Handle cancellation of InputBox to select range
- Using Excel VBA Macro To Capture + Save Screenshot of Specific Area In Same File
- Type Mismatch in Loop to scan Outlook Messages [duplicate]
- VBA: How to combine two ranges on different sheets into one, to loop through