Excel Expert page contents

XLXpart

Microsoft Excel is one of the Best application provided within Msoffice suite. Excel is very popular software among Corporate Sector. We have gained some really fantastic experience. Believe us it is very wonderful application and you will really enjoy using it. This blog is trying to convey some of its Excel's Dynamic Functions, Versatile Functionality, Flexibilities and some fun tricks. We shall also try to resolve your queries.

Search Here

Loading
Showing posts with label formula. Show all posts
Showing posts with label formula. Show all posts

1/1/10

IF Function in Excel

=IF(logical test, value if true, [value if false])




The IF function returns one value if a condition you specify evaluates to TRUE, and another value if that condition evaluates to FALSE. For example, the formula =IF(A1>10,"Over 10","10 or less") returns "Over 10" if A1 is greater than 10, and "10 or less" if A1 is less than or equal to 10.



The IF function syntax has the following arguments (argument: A value that provides information to an action, an event, a method, a property, a function, or a procedure.):



» logical_test Required. Any value or expression that can be evaluated to TRUE or FALSE. For example, A10=100 is a logical expression; if the value in cell A10 is equal to 100, the expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE. This argument can use any comparison calculation operator.



» value_if_true Required. The value that you want to be returned if the logical_test argument evaluates to TRUE. For example, if the value of this argument is the text string "Within budget" and the logical_test argument evaluates to TRUE, the IF function returns the text "Within budget." If logical_test evaluates to TRUE and the value_if_true argument is omitted (that is, there is only a comma following the logical_test argument), the IF function returns 0 (zero). To display the word TRUE, use the logical value TRUE for the value_if_true argument.



» value_if_false Optional. The value that you want to be returned if the logical_test argument evaluates to FALSE. For example, if the value of this argument is the text string "Over budget" and the logical_test argument evaluates to FALSE, the IF function returns the text "Over budget." If logical_test evaluates to FALSE and the value_if_false argument is omitted, (that is, there is no comma following the value_if_true argument), the IF function returns the logical value FALSE. If logical_test evaluates to FALSE and the value of the value_if_false argument is omitted (that is, in the IF function, there is no comma following the value_if_true argument), the IF function returns the value 0 (zero).

12/18/09

Date Functions

In Addition to Dynamic date handling Excel provides a wide range of Date related functions to enable us to manipulate dates as most extend.

  • Date Function: This function used to compose date
Syntex: Date(year,month,day)
Example:
=date(2009,12,17)
composes: 17th December'2009

  • you can also use DateValue function to convert String date into date

Syntex: DateValue("date")
Example:
=DateValue("2009/12/17")
Retunrs: 40164  (that is equals to 17th December'2009)

this value can be used further in any function as parameter.

Best part of this function is it flexibility that allows to enter the date in any format, As we take above example we could enter date "17/12/2009", "17 dec 09", "17-December-2009"


  • Day:  This function returns the day from any date provided
Syntex: Day(date) or Day("mm/dd/yyyy")
Example: Day("12/01/2009")
Returns: 01

Note: Excel uses the System's date format by default it is 'M/d/yyyy' you can change this format using control panel - Regional Settings - Dates



Month: Like day function month returns the month from any date provided
Syntex: Month(date) or Month("mm/dd/yyyy")
Example: Month("12/01/2009")
Returns: 12

Year: Like day & Month functions year returns the year from any date provided

Syntex: Year(date) or Year("mm/dd/yyyy")
Example: Year("12/01/2009")
Returns: 2009

Weekday: Weekday function returns the Weekday that is falling on the date provided

Syntex: =Weekday(date)
Example: =Weekday("2009/12/17")
Returns 5 i.e. Thursday
begning from Sunday = 1, Monday = 2 and so on Saturday = 7

Today(): This  function returns the current date. And as the date is changed Excel automatically updates today function on next calculation to the prevailling date this way it will always returen the present date.

Value returned by this function is variable it changes as the date changes to insert constant current date  that doesn't change with change date use Keyboard Shortcut Ctrl + ;

Date.Diff(): this function calculates the differances in months & year between two dates.
Syntex: date.diff(date1,date2)
Example: =DATE.DIFF("10/10/2008",today())
Return: 1 year 2 months  (Assuming today is 17-December-2009)
This function does not calculates differances in days.

For Additional Details about Dates Visit: http://xlxpart.blogspot.com/2009/12/dates-in-excel.html