TEXT function in Excel

Excel Date and Time Functions return a dynamic date or time in a cell.

How to join date and text together in Excel

To join a date with text, you can use concatenation with the TEXT function to control the date format.Generic formula =”text”&TEXT(date,format) Note: To control the date format, we use the TEXT function, which is designed to convert a number into text using a specified number format. Explanation  In the example shown, the formula in E4 is:… read more »

How to show last updated date stamp in Excel

To add a date stamp in a workbook to indicate a “date last updated”, you can use the TEXT function. Note:  The TEXT function can apply number formatting to numbers just like Excel’s built-in cell formats for dates, currency, fractions, and so on. However, unlike Excel’s cell formatting, the TEXT function works inside a formula… read more »

Pad week numbers with zeros in Excel

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… read more »

How to convert numbers to text using TEXT function in Excel

To convert numbers into text values, you can use the TEXT function. Normally, you want to maintain numeric values in Excel, because they can be used in formulas with other numbers. However, there are situations where converting numbers to text makes sense. For example, you might want to perform a lookup on numbers using wildcards, which… read more »

Convert date to Julian format in Excel

This tutorial shows how to Convert date to Julian format in Excel using example below. If you need to convert a date to a Julian date format in Excel, you can do so by building a formula that uses the TEXT, YEAR, and DATE functions. Formula =YEAR(date)&TEXT(date-DATE(YEAR(date),1,0),”000″) Explanation Background “Julian date format” refers to a… read more »

Convert date to month and year in Excel

This tutorial shows how to Convert date to month and year in Excel using example below. To convert a normal Excel date into yyyymm format (e.g. 9/1/2017 > 201709), you can use the TEXT function. Formula =TEXT(date,”yyyymm”) Explanation In the example shown, the formula in C6 is: =TEXT(B6,”yyyymm”) How this formula works The TEXT function… read more »

Convert date to text in Excel

This tutorial shows how to Convert date to text in Excel using example below. If you need to convert dates to text (i.e. date to string conversion) , you can use the TEXT function. The TEXT function can use patterns like “dd/mm/yyyy”, “yyyy-mm-dd”, etc. to convert a valid date to a text value. See table below for… read more »

Create date range from two dates in Excel

This tutorial shows how to Create date range from two dates in Excel using example below. To display a date range in one cell based on dates in different cells, you can use a formula based on the TEXT function. Formula =TEXT(date1,”format”)&” – “&TEXT(date2,”format”) Explanation In the example shown, the formula in cell E5 is:… read more »

Count dates in current month in Excel

This tutorial shows how to Count dates in current month in Excel using example below. To count dates in the current month, you can use a formula based on the COUNTIFS or SUMPRODUCT function as explained below. Formula =COUNTIFS(range,”>=”&EOMONTH(TODAY(),-1)+1,range,”<“&EOMONTH(TODAY(),0)+1) Explanation In the example shown above, the formula in E7 is: =COUNTIFS(dates,”>=”&EOMONTH(TODAY(),-1)+1,dates,”<“&EOMONTH(TODAY(),0)+1) Where “dates” is the named… read more »

Get days, hours, and minutes between dates in Excel

To calculate and display the days, hours, and minutes between two dates, you can use the TEXT function with a little help from the INT function. Alternatively, you can adapt the formula using SUMPRODUCT. Formula =INT(end-start)&” days “&TEXT(end-start,”h”” hrs “”m”” mins “””) Explanation In the example shown, the formula in D5 is: =INT(C5-B5)&” days “&TEXT(C5-B5,”h”” hrs… read more »

Sidebar