SlideShare a Scribd company logo
1 of 8
Excel Text Function – How to
Use
Excel Text function falls under the category of String Formulas. As the name suggest the task of
Text Function is to convert a numeric value to a string.
This function comes quite handy when you want to display numbers in a more readable format or
in such a format that makes more sense. Another situation where Text Formula can be used is :
while combining numbers and text strings together.
Recommended Reading : In our earlier posts, we discussed about some other string functions
like: INSTR, REPLACE, SEARCH, MATCH, SUBSTRING, MID etc.
Definition and Syntax of Text Function:
According to Microsoft Excel, Text Function is defined as “A formula that converts a value to
text in a specific number format.”
The Syntax of Text Formula is as follows:
=TEXT( value, format_text )
Here, ‘value’ specifies the number that you wish to convert to text.
‘format_text’ specifies the format according to which the conversion is to be done.
Please note that ‘format_text’ should always be enclosed in quotation marks. The various
values of ‘format_text’ argument can be:
Values Description
0 Forces the function to display only digits, no decimal places.
#
Displays a digit only if it adds to the accuracy of the number i.e. It skips leading zeros and zeros
after a decimal point.
. Specifies the position of Decimal point.
0% Formats the resultant text as percentage.
d Specifies Day of the month or Day of week, in preferably one digit representation (e.g. 1, 15)
dd Specifies Day in a two digit representation. (e.g. 01, 15)
ddd Specifies Day as short codes. (e.g. Mon, Tue)
dddd Specifies full name of the Day. (e.g. Monday, Tuesday)
m Specifies the Month of the Year, in preferably one digit representation (e.g. 1, 12)
mm Specifies Month in a two digit representation. (e.g. 01, 12)
mmm Specifies Month as short codes. (e.g. Jan, Dec)
mmmm Specifies full name of the Month. (e.g. January, December)
yy Specifies the Year, in a two digit representation (e.g. 09, 13)
yyyy Specifies the Year, in a four digit representation (e.g. 2009, 2013)
h Specifies Hours preferably one digit representation (e.g. 1, 24)
hh Specifies Hours, in a two digit representation (e.g. 01, 24)
m Specifies Minutes preferably one digit representation (e.g. 1, 50)
mm Specifies Minutes, in a two digit representation (e.g. 01, 50)
s Specifies Seconds preferably one digit representation (e.g. 1, 50)
ss Specifies Seconds, in a two digit representation (e.g. 01, 50)
AM/PM Specifies that time must be represented using a 12-hour clock format, followed by “AM” or “PM”.
How to Use Excel Text Function:
Now, let’s understand how to use Text Formula in Excel.
Let’s consider I have a date in my spreadsheet as: 19/04/2013
Objective: Now, my objective is to format this date as: Friday April, 19, 2013
So, I will try to use the text formula as:
‘value’: In this case our ‘value’ argument would contain the reference of cell A1.
‘format_text’: In our case ‘format_text’ argument would contain a value “dddd mmmm, dd,
yyyy“. See the ‘format_text’ argument table above for explanation.
The result would be: Friday April, 19, 2013
Some Important points about Text Formula:
 As we know that TEXT formula converts a numeric value to formatted text, and hence its
result cannot be used for calculation purpose.
 If you omit the quotation marks around the ‘format_text’ argument then, it throws a
#NAME? error.
 ‘format_text’ argument cannot contain an asterisk character (*).
Few examples of Text Function:
Now let’s see some examples of Text Formula.
Example 1: Use text formula to display the nearest whole number (without any decimal places)
to 3390.34.
To do this we can use the text formula as: =TEXT(3390.34,0)
Which results into: 3390
Example 2: Suppose we have a date (say: 11-Aug-2013) and now using a text formula find
which day falls on that date.
In this case we can use the below formula: =TEXT("11-Aug-13","dddd")
This results into: Sunday
Example 3: Suppose we have a products table as shown, now we need to write a text function
that displays the total amount earned.
So, we can use the text formula as: =TEXT(C2*D2,"$ #,###.00")
Example 4: Let’s consider we have an employee table as shown in the below image. Now our
task is to concatenate the name of an employee along with his date of birth.
If you don’t know how to concatenate in excel, then before going any further I would
recommend you to read this post.
At first impression this problem looks simple but if you try to concatenate Employee Name and
Date of Birth directly see what happens:
This problem occurs because, excel treats date as a number. So, to tackle this problem we will
have to use a text function to format the date while concatenation.
For this we will use the formula: =A2&" - "&TEXT(B2,"dd-mm-yyyy")
Example 5: Consider that we have a Dues Table of a Company as show in the below image.
Now as these companies belong to different parts of the world so, we have to convert the dues
amount (in U.S. dollars) into their corresponding currency.
To solve this problem we have to use nested IF function along with the text function.
In this problem we will use nested if conditions to check the company Country. Then we will
calculate the dues amount inside the text function and finally we will convert the dues amount to
the corresponding currency format.
So, this whole thing boils down to the formula:
=IF(A3="India",TEXT(C3*53.55,"Rs. #,##0.00"),IF(A3="U.K.",TEXT(C3*0.66,"£
#,##0.00"),IF(A3="Japan",TEXT(C3*99.5,"¥ #,##0.00"),C3)))
See this formula in action, below:
Don’t forget to download the spreadsheet containing all the above examples. Download it here.
So, this was all about Excel Text Function. Feel free to share your doubts and feedback related to
the topic.

More Related Content

What's hot

Spreadsheet Date & Time Functions
Spreadsheet Date & Time FunctionsSpreadsheet Date & Time Functions
Spreadsheet Date & Time FunctionsAnjan Mahanta
 
Excel tip: COUNTIF and COUNTIFS
Excel tip: COUNTIF and COUNTIFSExcel tip: COUNTIF and COUNTIFS
Excel tip: COUNTIF and COUNTIFSStefania Borchia
 
Excel SUMIFS Function
Excel SUMIFS FunctionExcel SUMIFS Function
Excel SUMIFS FunctionExcel
 
Using Excel Functions
Using Excel FunctionsUsing Excel Functions
Using Excel FunctionsGautam Gupta
 
Excel Database Function
Excel Database FunctionExcel Database Function
Excel Database FunctionAnita Shah
 
Excel training by rajesh p
Excel training by rajesh pExcel training by rajesh p
Excel training by rajesh pRajesh P
 
2. date and time function in excel
2. date and time function in excel2. date and time function in excel
2. date and time function in excelDr. Prashant Vats
 
worksheet and workbook
worksheet and workbookworksheet and workbook
worksheet and workbookIsaac Katete
 
Using the IF Function in Excel
Using the IF Function in ExcelUsing the IF Function in Excel
Using the IF Function in ExcelCasey Robertson
 
Charts in EXCEL
Charts in EXCELCharts in EXCEL
Charts in EXCELpkottke
 
3. lookup functions in excel
3. lookup functions in excel3. lookup functions in excel
3. lookup functions in excelDr. Prashant Vats
 
Ms excel excersices
Ms excel excersicesMs excel excersices
Ms excel excersicesHEENA PRUTHI
 
Advanced Filter Concepts in MS-Excel
Advanced Filter Concepts in MS-ExcelAdvanced Filter Concepts in MS-Excel
Advanced Filter Concepts in MS-ExcelP. SUNDARI ARUN
 
Excel: Freezing Panes
Excel: Freezing PanesExcel: Freezing Panes
Excel: Freezing Panesmaclark14
 

What's hot (20)

Spreadsheet Date & Time Functions
Spreadsheet Date & Time FunctionsSpreadsheet Date & Time Functions
Spreadsheet Date & Time Functions
 
Excel tip: COUNTIF and COUNTIFS
Excel tip: COUNTIF and COUNTIFSExcel tip: COUNTIF and COUNTIFS
Excel tip: COUNTIF and COUNTIFS
 
Excel SUMIFS Function
Excel SUMIFS FunctionExcel SUMIFS Function
Excel SUMIFS Function
 
Using Excel Functions
Using Excel FunctionsUsing Excel Functions
Using Excel Functions
 
Excel Database Function
Excel Database FunctionExcel Database Function
Excel Database Function
 
Ms excel
Ms excelMs excel
Ms excel
 
Intermediate Excel
Intermediate Excel Intermediate Excel
Intermediate Excel
 
Excel training by rajesh p
Excel training by rajesh pExcel training by rajesh p
Excel training by rajesh p
 
2. date and time function in excel
2. date and time function in excel2. date and time function in excel
2. date and time function in excel
 
worksheet and workbook
worksheet and workbookworksheet and workbook
worksheet and workbook
 
Introduction of Advance Excel
Introduction of Advance ExcelIntroduction of Advance Excel
Introduction of Advance Excel
 
Using the IF Function in Excel
Using the IF Function in ExcelUsing the IF Function in Excel
Using the IF Function in Excel
 
Charts in EXCEL
Charts in EXCELCharts in EXCEL
Charts in EXCEL
 
3. lookup functions in excel
3. lookup functions in excel3. lookup functions in excel
3. lookup functions in excel
 
Ms excel excersices
Ms excel excersicesMs excel excersices
Ms excel excersices
 
Advanced Filter Concepts in MS-Excel
Advanced Filter Concepts in MS-ExcelAdvanced Filter Concepts in MS-Excel
Advanced Filter Concepts in MS-Excel
 
Sumif () ppt
Sumif () pptSumif () ppt
Sumif () ppt
 
Formula in MS Excel
Formula in MS ExcelFormula in MS Excel
Formula in MS Excel
 
Excel: Freezing Panes
Excel: Freezing PanesExcel: Freezing Panes
Excel: Freezing Panes
 
MS Excel 2nd
MS Excel 2ndMS Excel 2nd
MS Excel 2nd
 

Viewers also liked

Viewers also liked (20)

WCDMA Overall
WCDMA OverallWCDMA Overall
WCDMA Overall
 
3 g frequencies
3 g frequencies3 g frequencies
3 g frequencies
 
Synchronisation
SynchronisationSynchronisation
Synchronisation
 
Pilot Pollution
Pilot PollutionPilot Pollution
Pilot Pollution
 
Tems problem
Tems problemTems problem
Tems problem
 
Auspicious_Profile_Teletalk(DT)_technical _Proposal
Auspicious_Profile_Teletalk(DT)_technical _ProposalAuspicious_Profile_Teletalk(DT)_technical _Proposal
Auspicious_Profile_Teletalk(DT)_technical _Proposal
 
Antenna alignment tool
Antenna alignment toolAntenna alignment tool
Antenna alignment tool
 
Test Assessment Cw
Test Assessment CwTest Assessment Cw
Test Assessment Cw
 
Technical Proposal ( Teletalk)
Technical Proposal ( Teletalk)Technical Proposal ( Teletalk)
Technical Proposal ( Teletalk)
 
New Resource
New ResourceNew Resource
New Resource
 
Wcdma
WcdmaWcdma
Wcdma
 
CW Testing
CW TestingCW Testing
CW Testing
 
3G Drive Test Procedure_ By Md Joynal Abaden@ MYM
3G Drive Test Procedure_ By Md Joynal Abaden@ MYM3G Drive Test Procedure_ By Md Joynal Abaden@ MYM
3G Drive Test Procedure_ By Md Joynal Abaden@ MYM
 
3G Drive Test Procedure_ By Md Joynal Abaden@ MYM
3G Drive Test Procedure_ By Md Joynal Abaden@ MYM3G Drive Test Procedure_ By Md Joynal Abaden@ MYM
3G Drive Test Procedure_ By Md Joynal Abaden@ MYM
 
IBS
IBSIBS
IBS
 
Handover Overview
Handover OverviewHandover Overview
Handover Overview
 
Export to map info table file with tems
Export to map info table file with temsExport to map info table file with tems
Export to map info table file with tems
 
Tems investigation 16.0_-_commerical_presentation (1)
Tems investigation 16.0_-_commerical_presentation (1)Tems investigation 16.0_-_commerical_presentation (1)
Tems investigation 16.0_-_commerical_presentation (1)
 
Drive Test Using Tems Investation 16
Drive Test Using Tems Investation 16Drive Test Using Tems Investation 16
Drive Test Using Tems Investation 16
 
Tems operation steps
Tems operation stepsTems operation steps
Tems operation steps
 

Similar to Excel text function

Functions data format
Functions data formatFunctions data format
Functions data formatgtankariagt
 
Sterling Integrator Map Editor
Sterling Integrator Map EditorSterling Integrator Map Editor
Sterling Integrator Map EditorJeyhind M
 
Les03 (Using Single Row Functions To Customize Output)
Les03 (Using Single Row Functions To Customize Output)Les03 (Using Single Row Functions To Customize Output)
Les03 (Using Single Row Functions To Customize Output)Achmad Solichin
 
Excel DATEDIFF Function
Excel DATEDIFF FunctionExcel DATEDIFF Function
Excel DATEDIFF FunctionExcel
 
Top 20 microsoft excel formulas you must know
Top 20 microsoft excel formulas you must knowTop 20 microsoft excel formulas you must know
Top 20 microsoft excel formulas you must knowAlexHenderson59
 
10 Excel Tips To Take Your Modeling From Good To Great
10 Excel Tips To Take Your Modeling From Good To Great10 Excel Tips To Take Your Modeling From Good To Great
10 Excel Tips To Take Your Modeling From Good To GreatChase R. Morrison
 
Microsoft Excel Advanced Features
Microsoft Excel Advanced FeaturesMicrosoft Excel Advanced Features
Microsoft Excel Advanced FeaturesAkashMeghwar2
 
Presentation on MS Excel-7.pptx
Presentation on MS Excel-7.pptxPresentation on MS Excel-7.pptx
Presentation on MS Excel-7.pptxamitaYadav40
 
3 Formulas, Ranges, Functions.ppt
3 Formulas, Ranges, Functions.ppt3 Formulas, Ranges, Functions.ppt
3 Formulas, Ranges, Functions.pptJosephIThomas
 
142500146 using-oracle-fast formula-for-payroll-calculations
142500146 using-oracle-fast formula-for-payroll-calculations142500146 using-oracle-fast formula-for-payroll-calculations
142500146 using-oracle-fast formula-for-payroll-calculationsuday reddy
 
Excel Overview.pptx
Excel Overview.pptxExcel Overview.pptx
Excel Overview.pptxNewmanLeke
 
Excel functionssimplymeasured
Excel functionssimplymeasuredExcel functionssimplymeasured
Excel functionssimplymeasuredcentral.zone
 
3 Formulas, Ranges, Functions.ppt
3 Formulas, Ranges, Functions.ppt3 Formulas, Ranges, Functions.ppt
3 Formulas, Ranges, Functions.pptAllanGuevarra1
 
Ms excel commands
Ms excel commandsMs excel commands
Ms excel commandsDiyaVerma14
 
Introductionto Spreadsheet - Excel .pptx
Introductionto Spreadsheet - Excel .pptxIntroductionto Spreadsheet - Excel .pptx
Introductionto Spreadsheet - Excel .pptxSanaShah93
 

Similar to Excel text function (20)

Functions data format
Functions data formatFunctions data format
Functions data format
 
Sterling Integrator Map Editor
Sterling Integrator Map EditorSterling Integrator Map Editor
Sterling Integrator Map Editor
 
Les03 (Using Single Row Functions To Customize Output)
Les03 (Using Single Row Functions To Customize Output)Les03 (Using Single Row Functions To Customize Output)
Les03 (Using Single Row Functions To Customize Output)
 
Les03
Les03Les03
Les03
 
Excel DATEDIFF Function
Excel DATEDIFF FunctionExcel DATEDIFF Function
Excel DATEDIFF Function
 
Top 20 microsoft excel formulas you must know
Top 20 microsoft excel formulas you must knowTop 20 microsoft excel formulas you must know
Top 20 microsoft excel formulas you must know
 
10 Excel Tips To Take Your Modeling From Good To Great
10 Excel Tips To Take Your Modeling From Good To Great10 Excel Tips To Take Your Modeling From Good To Great
10 Excel Tips To Take Your Modeling From Good To Great
 
Microsoft Excel Advanced Features
Microsoft Excel Advanced FeaturesMicrosoft Excel Advanced Features
Microsoft Excel Advanced Features
 
012. SQL.pdf
012. SQL.pdf012. SQL.pdf
012. SQL.pdf
 
Quick start learn dax basics in 30 minutes
Quick start   learn dax basics in 30 minutesQuick start   learn dax basics in 30 minutes
Quick start learn dax basics in 30 minutes
 
Presentation on MS Excel-7.pptx
Presentation on MS Excel-7.pptxPresentation on MS Excel-7.pptx
Presentation on MS Excel-7.pptx
 
3 Formulas, Ranges, Functions.ppt
3 Formulas, Ranges, Functions.ppt3 Formulas, Ranges, Functions.ppt
3 Formulas, Ranges, Functions.ppt
 
Les03
Les03Les03
Les03
 
142500146 using-oracle-fast formula-for-payroll-calculations
142500146 using-oracle-fast formula-for-payroll-calculations142500146 using-oracle-fast formula-for-payroll-calculations
142500146 using-oracle-fast formula-for-payroll-calculations
 
Ms excel 2016_function
Ms excel 2016_functionMs excel 2016_function
Ms excel 2016_function
 
Excel Overview.pptx
Excel Overview.pptxExcel Overview.pptx
Excel Overview.pptx
 
Excel functionssimplymeasured
Excel functionssimplymeasuredExcel functionssimplymeasured
Excel functionssimplymeasured
 
3 Formulas, Ranges, Functions.ppt
3 Formulas, Ranges, Functions.ppt3 Formulas, Ranges, Functions.ppt
3 Formulas, Ranges, Functions.ppt
 
Ms excel commands
Ms excel commandsMs excel commands
Ms excel commands
 
Introductionto Spreadsheet - Excel .pptx
Introductionto Spreadsheet - Excel .pptxIntroductionto Spreadsheet - Excel .pptx
Introductionto Spreadsheet - Excel .pptx
 

More from Anthony Obiora

Wcdma rno handover algorithm analysis and parameter configurtaion guidance 20...
Wcdma rno handover algorithm analysis and parameter configurtaion guidance 20...Wcdma rno handover algorithm analysis and parameter configurtaion guidance 20...
Wcdma rno handover algorithm analysis and parameter configurtaion guidance 20...Anthony Obiora
 

More from Anthony Obiora (6)

Eke.docx
Eke.docxEke.docx
Eke.docx
 
Plan PCI.docx
Plan PCI.docxPlan PCI.docx
Plan PCI.docx
 
topqualityvoice.pptx
topqualityvoice.pptxtopqualityvoice.pptx
topqualityvoice.pptx
 
Paging
PagingPaging
Paging
 
Call setup
Call setupCall setup
Call setup
 
Wcdma rno handover algorithm analysis and parameter configurtaion guidance 20...
Wcdma rno handover algorithm analysis and parameter configurtaion guidance 20...Wcdma rno handover algorithm analysis and parameter configurtaion guidance 20...
Wcdma rno handover algorithm analysis and parameter configurtaion guidance 20...
 

Recently uploaded

costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Recently uploaded (20)

costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

Excel text function

  • 1. Excel Text Function – How to Use Excel Text function falls under the category of String Formulas. As the name suggest the task of Text Function is to convert a numeric value to a string. This function comes quite handy when you want to display numbers in a more readable format or in such a format that makes more sense. Another situation where Text Formula can be used is : while combining numbers and text strings together. Recommended Reading : In our earlier posts, we discussed about some other string functions like: INSTR, REPLACE, SEARCH, MATCH, SUBSTRING, MID etc. Definition and Syntax of Text Function: According to Microsoft Excel, Text Function is defined as “A formula that converts a value to text in a specific number format.” The Syntax of Text Formula is as follows: =TEXT( value, format_text ) Here, ‘value’ specifies the number that you wish to convert to text. ‘format_text’ specifies the format according to which the conversion is to be done. Please note that ‘format_text’ should always be enclosed in quotation marks. The various values of ‘format_text’ argument can be: Values Description 0 Forces the function to display only digits, no decimal places. # Displays a digit only if it adds to the accuracy of the number i.e. It skips leading zeros and zeros after a decimal point. . Specifies the position of Decimal point. 0% Formats the resultant text as percentage. d Specifies Day of the month or Day of week, in preferably one digit representation (e.g. 1, 15)
  • 2. dd Specifies Day in a two digit representation. (e.g. 01, 15) ddd Specifies Day as short codes. (e.g. Mon, Tue) dddd Specifies full name of the Day. (e.g. Monday, Tuesday) m Specifies the Month of the Year, in preferably one digit representation (e.g. 1, 12) mm Specifies Month in a two digit representation. (e.g. 01, 12) mmm Specifies Month as short codes. (e.g. Jan, Dec) mmmm Specifies full name of the Month. (e.g. January, December) yy Specifies the Year, in a two digit representation (e.g. 09, 13) yyyy Specifies the Year, in a four digit representation (e.g. 2009, 2013) h Specifies Hours preferably one digit representation (e.g. 1, 24) hh Specifies Hours, in a two digit representation (e.g. 01, 24) m Specifies Minutes preferably one digit representation (e.g. 1, 50) mm Specifies Minutes, in a two digit representation (e.g. 01, 50) s Specifies Seconds preferably one digit representation (e.g. 1, 50) ss Specifies Seconds, in a two digit representation (e.g. 01, 50) AM/PM Specifies that time must be represented using a 12-hour clock format, followed by “AM” or “PM”. How to Use Excel Text Function: Now, let’s understand how to use Text Formula in Excel. Let’s consider I have a date in my spreadsheet as: 19/04/2013
  • 3. Objective: Now, my objective is to format this date as: Friday April, 19, 2013 So, I will try to use the text formula as: ‘value’: In this case our ‘value’ argument would contain the reference of cell A1. ‘format_text’: In our case ‘format_text’ argument would contain a value “dddd mmmm, dd, yyyy“. See the ‘format_text’ argument table above for explanation.
  • 4. The result would be: Friday April, 19, 2013 Some Important points about Text Formula:  As we know that TEXT formula converts a numeric value to formatted text, and hence its result cannot be used for calculation purpose.  If you omit the quotation marks around the ‘format_text’ argument then, it throws a #NAME? error.  ‘format_text’ argument cannot contain an asterisk character (*). Few examples of Text Function: Now let’s see some examples of Text Formula. Example 1: Use text formula to display the nearest whole number (without any decimal places) to 3390.34. To do this we can use the text formula as: =TEXT(3390.34,0) Which results into: 3390 Example 2: Suppose we have a date (say: 11-Aug-2013) and now using a text formula find which day falls on that date. In this case we can use the below formula: =TEXT("11-Aug-13","dddd") This results into: Sunday Example 3: Suppose we have a products table as shown, now we need to write a text function that displays the total amount earned.
  • 5. So, we can use the text formula as: =TEXT(C2*D2,"$ #,###.00") Example 4: Let’s consider we have an employee table as shown in the below image. Now our task is to concatenate the name of an employee along with his date of birth. If you don’t know how to concatenate in excel, then before going any further I would recommend you to read this post.
  • 6. At first impression this problem looks simple but if you try to concatenate Employee Name and Date of Birth directly see what happens: This problem occurs because, excel treats date as a number. So, to tackle this problem we will have to use a text function to format the date while concatenation. For this we will use the formula: =A2&" - "&TEXT(B2,"dd-mm-yyyy")
  • 7. Example 5: Consider that we have a Dues Table of a Company as show in the below image. Now as these companies belong to different parts of the world so, we have to convert the dues amount (in U.S. dollars) into their corresponding currency. To solve this problem we have to use nested IF function along with the text function. In this problem we will use nested if conditions to check the company Country. Then we will calculate the dues amount inside the text function and finally we will convert the dues amount to the corresponding currency format. So, this whole thing boils down to the formula: =IF(A3="India",TEXT(C3*53.55,"Rs. #,##0.00"),IF(A3="U.K.",TEXT(C3*0.66,"£ #,##0.00"),IF(A3="Japan",TEXT(C3*99.5,"¥ #,##0.00"),C3))) See this formula in action, below:
  • 8. Don’t forget to download the spreadsheet containing all the above examples. Download it here. So, this was all about Excel Text Function. Feel free to share your doubts and feedback related to the topic.