Sunday, February 26, 2012

Convert Number to text in excel

The following is a macro which will to convert number to string. for using the below macro code you need to press F11 in excel to open the Visual Basic Editor, and then click Insert, Module Copy and paste the below code in Module.




Saturday, February 25, 2012

Show developer tab in Microsoft Office Applications

To show the Developer tab for Microsoft Office 2010 applications

  1. Start the application.
  2. Click the File tab.
  3. Click Options.
  4. In the categories pane, click Customize Ribbon.
  5. In the list of main tabs, select Developer.
  6. Click OK to close the Options dialog box.

To show the Developer tab for Word 2007, Excel 2007, and PowerPoint 2007

  1. Start the application.
  2. Click the Microsoft Office Button.
  3. Click Word Options, Excel Options, or PowerPoint Options.
  4. In the categories pane, click Popular.
  5. Select Show Developer tab in the Ribbon.
  6. Click OK to close the Options dialog box.

To show the Developer tab for Outlook 2007

  1. Start Outlook.
  2. On the Tools menu, click Options.
  3. In the Options dialog box, click the Other tab, and then click Advanced Options.
  4. In the Advanced Options dialog box, select Show Developer tab in the Ribbon, and then click OK.
  5. Click OK to close the Options dialog box.

Find working days in a month

Syntax of Networkdays formula:
networkdays(from this date, to this date, [add this holidays as well])

Examples of Excel Networkdays formula:
networkdays("12/1/2008","12/31/2008") = 23
Examples That Use Cell References
A1: 12/24/92
A2: 12/25/92

Then, type the following formula in cell D1:

=NETWORKDAYS(DATEVALUE("1/1/92"),DATEVALUE("12/31/92"),A1:A2)

-or-

A1: 1/1/92
A2: 12/31/92
A3: 12/24/92
A4: 12/25/92

Then, type the following formula in cell D1:

=NETWORKDAYS(A1,A2,A3:A4)

Saturday, February 18, 2012

Extract month and year from date in excel

Many time we need only Month or Month + Year from date in excel in a particular format. Below formula will help us to achieve that.

Date: 12-Jan-2012 - formulae "=TEXT(H51,"mmmm-yyyy")" will extract and show month and year in below format.

"January-2012"

*H51 is the cell reference where actual date is there.

Sunday, February 12, 2012

Use basic excel shortcut keys

The first thing before anything is to know the excel shortcut keys. This will help you to work efficiently. Following are the most important and basic excel shortcut keys.

"CTRL+PgUp" Switches between worksheet tabs, from left-to-right.

"CTRL+PgDn" Switches between worksheet tabs, from right-to-left.

"CTRL+SHIFT+(" Unhides any hidden rows within the selection.

"CTRL+SHIFT+&" Applies the outline border to the selected cells.

"CTRL+SHIFT_" Removes the outline border from the selected cells.

"CTRL+SHIFT+~" Applies the General number format.

"CTRL+SHIFT+$" Applies the Currency format with two decimal places (negative numbers in parentheses).

"CTRL+SHIFT+%" Applies the Percentage format with no decimal places.

"CTRL+SHIFT+^" Applies the Scientific number format with two decimal places.

"CTRL+SHIFT+#" Applies the Date format with the day, month, and year.

"CTRL+SHIFT+@" Applies the Time format with the hour and minute, and AM or PM.

"CTRL+SHIFT+!" Applies the Number format with two decimal places, thousands separator, and minus sign (-) for negative values.

"CTRL+SHIFT+*" Selects the current region around the active cell (the data area enclosed by blank rows and blank columns).In a PivotTable, it selects the entire PivotTable report.

"CTRL+SHIFT+:" Enters the current time.

"CTRL+SHIFT+"" Copies the value from the cell above the active cell into the cell or the Formula Bar.

"CTRL+;" Enters the current date.

"CTRL+`" Alternates between displaying cell values and displaying formulas in the worksheet.

"CTRL+'" Copies a formula from the cell above the active cell into the cell or the Formula Bar.

"CTRL+1" Displays the Format Cells dialog box.

"CTRL+2" Applies or removes bold formatting.

"CTRL+3" Applies or removes italic formatting.

"CTRL+4" Applies or removes underlining.

"CTRL+5" Applies or removes strikethrough.

"CTRL+6" Alternates between hiding and displaying objects.

"CTRL+8" Displays or hides the outline symbols.

"CTRL+9" Hides the selected rows.

"CTRL+0" Hides the selected columns.

"CTRL+A" Selects the entire worksheet. If the worksheet contains data,

"CTRL+A" selects the current region. Pressing

"CTRL+A" a second time selects the entire worksheet.When the insertion point is to the right of a function name in a formula, displays the Function Arguments dialog box.

"CTRL+SHIFT+A" inserts the argument names and parentheses when the insertion point is to the right of a function name in a formula.

"CTRL+B" Applies or removes bold formatting.

"CTRL+C" Copies the selected cells.

"CTRL+D" Uses the Fill Down command to copy the contents and format of the topmost cell of a selected range into the cells below.

"CTRL+F" Displays the Find and Replace dialog box, with the Find tab selected.

"SHIFT+F5" also displays this tab, while SHIFT+F4 repeats the last Find action.

"CTRL+SHIFT+F" opens the Format Cells dialog box with the Font tab selected.

"CTRL+G" Displays the Go To dialog box. F5 also displays this dialog box.

"CTRL+H" Displays the Find and Replace dialog box, with the Replace tab selected.

"CTRL+I" Applies or removes italic formatting.

"CTRL+K" Displays the Insert Hyperlink dialog box for new hyperlinks or the Edit Hyperlink dialog box for selected existing hyperlinks.CTRL+L Displays the Create Table dialog box.

"CTRL+N" Creates a new, blank workbook.

"CTRL+O" Displays the Open dialog box to open or find a file.

"CTRL+SHIFT+O" selects all cells that contain comments.

"CTRL+P" Displays the Print tab in Microsoft Office Backstage view.

"CTRL+SHIFT+P" opens the Format Cells dialog box with the Font tab selected.

"CTRL+R" Uses the Fill Right command to copy the contents and format of the leftmost cell of a selected range into the cells to the right.

"CTRL+S" Saves the active file with its current file name, location, and file format.

"CTRL+T" Displays the Create Table dialog box.

"CTRL+U" Applies or removes underlining.

"CTRL+SHIFT+U" switches between expanding and collapsing of the formula bar.

"CTRL+V" Inserts the contents of the Clipboard at the insertion point and replaces any selection. Available only after you have cut or copied an object, text, or cell contents.

"CTRL+ALT+V" displays the Paste Special dialog box. Available only after you have cut or copied an object, text, or cell contents on a worksheet or in another program.

"CTRL+W" Closes the selected workbook window.

"CTRL+X" Cuts the selected cells.

"CTRL+Y" Repeats the last command or action, if possible.

"CTRL+Z" Uses the Undo command to reverse the last command or to delete the last entry that you typed.

TIP The CTRL cominbations CTRL+E, CTRL+J, CTRL+M, and CTRL+Q are currently unassigned shortcuts.

Count number of words in excel


Many of us have come across one or other scenario where we sometime need to count or keep track of number of words in excel.

See below formulae how to do this.

=LEN(A1)-LEN(SUBSTITUTE(A1," ",""))+1

Saturday, February 11, 2012

Make gantt chart using conditional formatting


There are many which shows you complex ways of creating Gantt chart. The following shows how to create a Gantt chart in just 5 mins. Why you want to waste an hour when you can create it in minutes.

Please create Task Name, Start Date and End Date for your activities. Add the month date as shown below in the image.


Now select all the dates. In above case from D2 to H5 and select conditional formatting formulae based.




Write the formulae as shown above and also select the format in which you want to highlight the cells. Please note thet I have used $ in some cases to make it fixed. I have made B and C columns as fixed however i not made their row numbers as fixed. Once you click OK your Gantt Chart will be shown as below.