Sat 29 Apr 2017

Excel Quiz 51

By |Saturday, April 29th, 2017|Categories: Quizzes|Tags: , , , , , , , , , , , |0 Comments

Excel Quiz 51 - A Quiz on Page Layout Tab in Excel

This quiz checks your knowledge on Page Layout tab in Excel.

Sat 24 Dec 2016

Tips & Tricks 152 - While Printing a Sheet, Don't Print Page Number on First Two Pages and Print 1 on 3rd Page

By |Saturday, December 24th, 2016|Categories: Tips and Tricks, VBA|Tags: , , , , , |0 Comments

One user had a specific requirement. His first two pages were cover page and Table of Contents. Hence, he wanted to start his page number from 3rd page. He wanted to display page X of Y. Hence, if the worksheet had 10 pages, his 3rd page should say 1 of 8......Last Page should say 8 of 8.

The above problem will have to be solved through VBA.

1. Make a backup of your workbook.
2. Open your workbook and ALT+F11
3. Locate your Workbook name in Project Explorer Window
4. Double click on ThisWorkbook
5. Copy paste the Macro code given
7. Save your file as .xlsm
8. Create a button and attach this macro to that button

' ** Vijay A Verma ( **

Private Sub Workbook_BeforePrint(Cancel As Boolean)
    Cancel = True
    Application.EnableEvents = False
    ActiveSheet.PrintOut From:=1, To:=2
    ActiveSheet.PageSetup.CenterFooter = "&P-2 of " & ActiveSheet.PageSetup.Pages.Count - 2
    ActiveSheet.PrintOut From:=3
    ActiveSheet.PageSetup.CenterFooter = ""
    Application.EnableEvents = True
End Sub



Sat 20 Sep 2014

Tips & Tricks 53 - Print Comments in the Sheet

By |Saturday, September 20th, 2014|Categories: Tips and Tricks|Tags: , , |0 Comments

1. You need to show the comments which you want to print or you can show all comments in the sheet. To show the comments

 Show Comments in the Sheet

2. First step is mandatory for printing the comments. Only those comments will be printed which are shown in the sheet.



4. After setting up page, you can fire the print.