Sat 03 Jun 2017

## Tips & Tricks 160 - When is Labor Day in a Given Year

By |Saturday, June 03rd, 2017|Categories: Tips and Tricks||0 Comments

While 1st May is celebrated as Labour Day in most of the countries but in USA/Canada, it is celebrated on 1st Monday of September.

Suppose the year is given in cell A1, you can use following formula to calculate the date for Labor Day

=CEILING(DATE(A1,9,1)-2,7)+2

Note - This utilizes the knowledge gained in Article 34 - Show Date for a Coming or Previous Day (Say Coming Monday, Previous Friday)

Sat 22 Apr 2017

## Tips & Tricks 159 - Prompted to "Save File" even if I haven't changed anything

By |Saturday, April 22nd, 2017|Categories: Tips and Tricks||0 Comments

When you open a workbook and you change something in the workbook and you close the workbook, it will ask you to save the workbook. But sometimes, even if you have not changed anything, still the workbook asks to be saved even if you haven't changed.

Point 1 - Microsoft has provided the answer to this question at following link -

Sat 08 Apr 2017

## Tips & Tricks 158 - Overcoming column_index_number problem in VLOOKUP when a column is inserted / deleted

By |Saturday, April 08th, 2017|Categories: Tips and Tricks||0 Comments

One of the negative points which gets attributed to VLOOKUP is that whenever a column is added / inserted within the range of VLOOKUP, the column index number doesn't change. Hence, it gives wrong result. Let's consider below dataset and for a given Emp ID, I need gender of that person. Hence, for Emp ID, 754761, the formula would be =VLOOKUP(754761,\$A:\$G,6,0) and answer would be F. Now, let's delete a column and now the answer would be lelia.vang@gmail.com as column_index_number is still 6. Now, add a column and the answer would be Vang as column_index_number is still 6.

Sat 04 Mar 2017

## Tips & Tricks 157 - Search for Online Templates Greyed Out / Disabled

By |Saturday, March 04th, 2017|Categories: Tips and Tricks||0 Comments

When we create a new workbook through File > New, we get a box where we can search for online templates. But, at times, it may be greyed out or disabled i.e. you can not type out anything out there.

To correct this, you need to enable internet setting for Excel.

File > Options (You can also invoke Excel options through shortcut ALT+T+O) > Trust Center > Trust Center Settings > Privacy Options > Allow Office to connect to Internet and Check this box.

Sat 18 Feb 2017

## Tips & Tricks 156 - Get Workbook's Directory from Formula

By |Saturday, February 18th, 2017|Categories: Tips and Tricks|Tags: , , , |0 Comments

If your workbook is located in say C:\Excel\MyDocs, the formula to retrieve the directory for this would be

=LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1))-2)

Note - For this formula to work, you workbook must be saved at least once.

Sat 11 Feb 2017

## Tips & Tricks 155 - Gridlines not Visible, Help!!

By |Saturday, February 11th, 2017|Categories: Tips and Tricks||0 Comments

You may try following one by one and verify your results

1. Update your Printer Driver to latest from internet (Or change your default printer driver to PDF/XPS/One Note)

2. Select the triangle between row 1 and column A to select entire sheet (or CTRL+A, 3 times).

Home tab > Go to Paint Bucket and select No Fill (or any other color other than white).

3. View tab > Check Gridlines if not already checked.

4. File > Options > Advanced

Make sure Gridline color is set Automatic (or any other color other than white)

5. Select the triangle between row 1 and column A to select entire sheet (or CTRL+A, 3 times) > Right Click > Format Cells > Border Color should be Automatic or any other color other than white.

Sat 21 Jan 2017

## Tips & Tricks 154 - Insert a Space after Each Character

By |Saturday, January 21st, 2017|Categories: Tips and Tricks, VBA|Tags: , , , , , , , |0 Comments

You have a sheet and you want to put a space after each character. For example, A1 contains 12345, you want to make it 1 2 3 4 5. B1 contains Mango12 and you want to make it M a n g o 1 2. The same need to be accomplished by a simple macro. (Flash Fill also works in most of the cases. But Flash Fill will copy in a different range which you will have to copy back and if data is scattered throughout the sheet, it may not be convenient)

1. Make a backup of your workbook.
2. Open your workbook and ALT+F11
3. Locate your Workbook name in Project Explorer Window
4. Right click on your workbook name > Insert > Module
5. Copy paste the Macro code given and change "Sheet1" as per your requirement.
6. Go back to your Workbook and ALT+F8 to display Macro Window
7. Run your Macro from here
8. Delete you Macro if the Macro was needed to be run only once.
9. Otherwise save your file as .xlsm if you intend to reuse Macro again.

Sat 07 Jan 2017

## Tips & Tricks 153 - Sum only Visible Columns

By |Saturday, January 07th, 2017|Categories: Tips and Tricks, VBA|Tags: , , , , , , , , |2 Comments

You can use SUBTOTAL or AGGREGATE function to sum visible rows but Excel doesn't provide the facility to sum only visible columns. Look below. Columns B and D are hidden. Hence, our function should sum up only A, C, E and F. G2 has the formula =SUM(A2:F2)

If you hide the columns, the sum stays the same whether columns are hidden or visible.

Unfortunately, Excel doesn't provide any native functionality to accomplish this. This will have to be done through a VBA function. We will write a VBA function "SumVisCols" which can be called like =SumVisCols(A2:F2)

(You can give any range not only A2:F2)

1. Make a backup of your workbook.
2. Open your workbook and ALT+F11
3. Locate your Workbook name in Project Explorer Window
4. Right click on your workbook name > Insert > Module
5. Copy paste the Macro code given and change the bold lines as per your requirement
6. Go back to your Workbook and ALT+F8 to display Macro Window
7. Run your Macro from here
8. Delete you Macro if the Macro was needed to be run only once.
9. Otherwise save your file as .xlsm if you intend to reuse Macro again.

Sat 10 Dec 2016

## Tips & Tricks 151 - Saving in ODS (OpenDocument Spreadsheet) but Don't Need Excel Warning Message - "Do you want....."

By |Saturday, December 10th, 2016|Categories: Tips and Tricks||0 Comments

Question - Sometimes, I may require to work in different Office Suites and to maintain compatibility, I use Open Document Format. But whenever, I save in Open Document Format (ODS - OpenDocument Spreadsheet), I get the Excel warning like below. I don't need this. What is the way out?

Answer - This requires a registry hack, hence you need to take the backup of your registry first. Also, if you are not comfortable with modifying your registry, don't proceed.

For backing up your registry and restoring in case of any issue - https://support.microsoft.com/en-us/kb/322756

1. Press Windows +R, type regedit and press Enter.
2. Navigate to the following location:
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Excel\Options
(In case of Excel 2013, replace 16.0 with 15.0, Excel 2010 - 14.0, Excel 2007 - 12.0, Office 2003 - 11.0)
3. Right click on the in the left panel and select New>DWORD.
4. Once new DWORD is create right click on it and select Rename asDisableSaveAsLossWarningOpenDocumentSpreadsheet
5. Set Value data 1 to suppress the warning message.