Find Excel Version



Dear Friends,

Usually while working on any of the VBA projects, it becomes important for me to first check the version of excel which user is using and based on that certain functionality of my tool may or may not work. For Example: If you have some sales data using more than 256 columns then if user is using Excel 2003, then it would not be possible as Excel 2003 has got only 256 columns. But if user is using any higher version like Excel 2007 etc. then it is possible to do so without any error as they have got 16000+ columns in it. This way before processing the data if you can identify the version of the excel user is using then you will be able to handle the error without crashing the excel.

  • New features included in this version were improved support for XML, a new “list range” feature, Smart Tag enhancements, and corrected statistical functions. Most users will not find the data-related upgrade worthwhile. 12: Microsoft Office Excel 2007: 2007: This Windows version marked some major changes to Excel.
  • How to find an excel version.
  • Find operating system info in Windows 7. Select the Start button, type Computer in the search box, right-click on Computer, and then select Properties. Under Windows edition, you'll see the version and edition of Windows that your device is running.

Find Excel File Version

FindFind

As user I would always prefer a clear message stating that “this functionality is not available in so and so Excel version” rather than getting some weird Microsoft error message and messing up other functionalities as well.

Excel

Mar 13, 2020 Launch Microsoft Excel on your computer and click on 'File' followed by 'Info'. Select the tab that says 'Manage Versions' to view all the available versions of your file. When your file versions are shown, select the one you want to recover, and it will open in the software for you.

It is a very simple piece of code which will determine which version of excel user is using. Whenever you call the bellow function at any moment of time when it is necessary to check the version of the excel.

Find

Important Note:

VBA.Val(Application.Version) returns a number. Each version of the excel can be determined by the following mapping of Version Number and name. Same mapping I have put in the above code:
Do not ask me why version number 13 is missing from the sequence 🙂

Find Excel Version

Version NumberVersion Name
8Excel 97
9Excel 2000
10Excel 2002
11Excel 2003
12Excel 2007
14Excel 2010
15Excel 2013
16Excel 2016

How to use this function?

Step 1. Copy the above code
Step 2. Create a publich module in your VBA project
Step 3. Paste this code there
Step 4. Now you are ready to call this function anywhere in your workbook
you can also call this function from you excel cell as a formula and it will return the version of the excel you are using currently.
Enjoy writing full proof VBA code without any unknown error related to excel version. Keep looking in this space for many more such small tips and tricks in VBA.

Have a nice weekend !!