Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • How to get address of last cell in range in Excel
  • VLOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel MMULT Function
  • Extract data with helper column in Excel
  • How to get last row in text data in Excel

Data Analysis Examples

  • How to count table columns in Excel
  • Excel Frequency Function Example
  • How To Compare Two Lists in Excel
  • Randomize/ Shuffle List in Excel
  • How To Create Frequency Distribution in Excel

Data Validation Examples

  • Excel Data validation don’t exceed total
  • Excel Data validation exists in list
  • Excel Data validation specific characters only
  • Data validation must not exist in list
  • Excel Data validation date in next 30 days

Pad week numbers with zeros in Excel

by

To pad week numbers (or any number) with zeros using a formula, you can use the TEXT function.

Formula

=TEXT(WEEKNUM(date,type),"00")

Explanation

In the example show, D5 contains this formula:

=TEXT(WEEKNUM(B5,21),"00")

Which returns the string “07”.

Worked Example:   Get week number from date in Excel

How this formula works

The TEXT function can apply number formats of any kind, including currency, date, percentage, etc. By applying a number format like “00”, “000”, “0000”, you can “pad” numbers with as many zeros as you like. Zeros will only be added where needed.

Worked Example:   How to convert numbers to text using TEXT function in Excel

Number format only

The TEXT function converts numbers to text as a normal step in applying the number format.

If you are concatenating (joining) the result to another text string, this is fine, but if you just want to apply visual padding to a free-standing number set of numbers, you can apply a custom number format without using a formula.

Worked Example:   How to show last updated date stamp in Excel

Post navigation

Previous Post:

Sum race time splits in Excel

Next Post:

How to calculate future date say 6 months ahead in Excel

Leave a Reply Cancel reply

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

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others
  • Join cells with comma in Excel
  • RIGHT, RIGHTB functions: Description, Usage, Syntax, Examples and Explanation
  • T function: Description, Usage, Syntax, Examples and Explanation
  • How to extract domain from email address in Excel
  • Remove leading and trailing spaces from text in one or more cells in Excel
  • DAYS function: Description, Usage, Syntax, Examples and Explanation
  • Excel Date & Time Functions Example
  • Two ways to sum time over 30 minutes in Excel
  • Convert Excel time to decimal minutes
  • Calculate date overlap in days in Excel
  • PMT function: Description, Usage, Syntax, Examples and Explanation
  • COUPNCD function: Description, Usage, Syntax, Examples and Explanation
  • How to calculate Net Present Value (NPV) in Excel
  • ODDLYIELD function: Description, Usage, Syntax, Examples and Explanation
  • ODDLPRICE function: Description, Usage, Syntax, Examples and Explanation
Acronyms, Abbreviations, Initialism & What They Stand For
© 2022 xlsoffice . All Right Reserved. | Teal Smiles