Go Back   2021-2022 StudyChaCha > StudyChaCha Discussion Forum > General Topics

  #1  
Old September 26th, 2017, 03:36 PM
Unregistered
Guest
 
Default Format VBA Excel

Hi I would like to have the information about the format function available in Microsoft Excel as well as the details about the Format Function as VBA?
Reply With Quote
Other Discussions related to this topic
Thread
Rate Analysis-DSR14 in Excel format
Excel College
Excel Courses at NAIT
ESI Form 5 Excel
SRV Excel Mhss
Excel InfoTech
Excel Engineering College
Excel Polytechnic College
Ms Excel Institute Delhi
Excel College
Excel Institute
Excel School UK
Excel Institute.com
Excel Courses NYC
Excel Flight School
Excel Classes LA
SRV excel school namakkal
The Excel Academy
Excel Computer
Excel IT College






  #2  
Old September 26th, 2017, 04:50 PM
Super Moderator
 
Join Date: May 2011
Default Re: Format VBA Excel

The Microsoft Excel FORMAT work takes a string articulation and returns it as an arranged string.

The FORMAT work is a worked in work in Excel that is ordered as a String/Text Function. It can be utilized as a VBA work (VBA) in Excel. As a VBA work, you can utilize this capacity in large scale code that is entered through the Microsoft Visual Basic Editor.

Syntax
The syntax for the FORMAT function in Microsoft Excel is:
Format ( expression, [ format ] )

Parameters or Arguments

expression
The string value to format.

format
Optional. It is the format to apply to the expression. You can either define your own format or use one of the named formats that Excel has predefined such as:

Returns

The FORMAT function returns a string value.

Applies To

Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000

Type of Function

VBA function (VBA)

Example (as VBA Function)

The FORMAT function can only be utilised in VBA code in Microsoft Excel.

Let's look at some Excel FORMAT function examples as well as explore how to use the FORMAT function in Excel VBA code:

Example - VBA Function






Format
Explanation

General Number
Displays a number without thousand separators.

Currency
Displays thousand separators as well as two decimal places.

Fixed
Displays at least one digit to the left of the decimal place and two digits to the right of the decimal place.

Standard
Displays the thousand separators, at least one digit to the left of the decimal place, and two digits to the right of the decimal place.

Percent
Displays a percent value - that is, a number multiplied by 100 with a percent sign. Displays two digits to the right of the decimal place.

Scientific
Scientific notation.


Yes/No
Displays No if the number is 0. Displays Yes if the number is not 0.

True/False
Displays False if the number is 0. Displays True if the number is not 0.

On/Off
Displays Off if the number is 0. Displays On is the number is not 0.

General Date
Displays date based on your system settings

Long Date
Displays date based on your system's long date setting

Medium Date
Displays date based on your system's medium date setting

Short Date
Displays date based on your system's short date setting

Long Time
Displays time based on your system's long time setting

Medium Time
Displays time based on your system's medium time setting

Short Time
Displays time based on your system's short time setting
Attached Files Available for Download
File Type: pdf Format Function (Visual Basic for Applications) Details.pdf (129.4 KB, 9 views)
__________________
Answered By StudyChaCha Member
Reply With Quote
Reply


Reply to this Question / Ask Another Question
Your Username: Click here to log in

Message:
Options



All times are GMT +6.5. The time now is 05:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0 PL2

1 2 3 4 5 6 7 8