Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Everything about Charts in Excel
  • Create Scatter Chart in Excel
  • Excel Frequency Function Example
  • How To Sort One Column or Multiple Columns in Excel
  • How to conditionally sum numeric data in an Excel table using SUMIFS

References

  • Extract all partial matches in Excel
  • How to get first row number in range in Excel
  • How to get last column number in range in Excel
  • How to use Excel LOOKUP Function
  • Excel Advanced Lookup using Index and Match Functions

Data Validations

  • Excel Data validation unique values only
  • Excel Data validation require unique number
  • Excel Data validation date in next 30 days
  • Excel Data validation whole percentage only
  • Prevent invalid data entering in specific cells

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”.

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.

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.

Post navigation

Previous Post:

DECIMAL function: Description, Usage, Syntax, Examples and Explanation

Next Post:

AVERAGE function: Description, Usage, Syntax, Examples and Explanation

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

Logical Functions

  • IF with boolean logic in Excel
  • How to use Excel FALSE Function
  • NOT function: Description, Usage, Syntax, Examples and Explanation
  • How to return blank in place of #DIV/0! error in Excel
  • How to use Excel NOT Function

Date Time

  • Create date range from two dates in Excel
  • How to Calculate Age in Excel
  • Add years to date in Excel
  • Calculate retirement date in Excel
  • Add workdays no weekends in Excel

Grouping

  • Map text to numbers in Excel
  • Running count group by n size in Excel
  • Group arbitrary text values in Excel
  • How to randomly assign data to groups in Excel
  • Group times into unequal buckets in Excel

General

  • List worksheet index numbers in Excel
  • How to add sequential row numbers to a set of data in Excel
  • Basic text sort formula in Excel
  • How to calculate profit margin percentage in Excel
  • How to Create Calendar in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning