Tags: XLM 4.0 MACRO

Sum data from a particular cell of last n sheets only

{ 0 Comments }

A number is entered in cell A1 of every sheet in a multi sheet workbook.  The task is to sum numbers in cell C2 of the Summary sheet from cell A1 of last x sheets – x is the number of sheets (mentioned in cell B2 of the Summary sheet) from which numbers have to be summed […]

Read More →

Worksheet formulas in a newly copied worksheet should point to the previous worksheet

{ 15 Comments }

Assume a worksheet with formulas referring to the previous worksheet.  When this sheet is copied by right clicking the sheet and selecting Move or Copy > Copy, formulas in this newly created sheet, should change to refer to the previous sheet. In other words, if sheet2 has formulas referring to sheet1, then when sheet3 is created (by […]

Read More →

Consolidate data from a specific worksheet of multiple workbooks to multiple worksheets of one workbook

{ 8 Comments }

Assume there are multiple files saved in a specific folder.  There can be Excel, Word, PDF, PowerPoint and other files types saved in this folder.  Furthermore, Excel files can have following extensions – .xls,.xlsx.xlsm.  Each Excel file has multiple worksheets with one worksheet being named Sheet1.  While data on sheet1 of all Excel files will start […]

Read More →

Extract text from a custom formatted cell

{ 34 Comments }

In range G5:G44, some numbers are entered.  These numbers are custom formatted with General” Dr” for debit entries and General” Cr” for credit entries. One may want to extract the Dr and Cr in range H5:H44. The following process will get the desired result: 1. Press Ctrl+F3 > New and in the Name box, type […]

Read More →

Consolidate data from multiple closed Excel files with different number of columns

{ 6 Comments }

Assume a folder on the desktop named Test.  Within this folder there is a another folder named Monthly Data.  Within this folder are MS Excel files received every month.  The number of columns in each file is not the same.  Therefore in the January .xlsx file, there would be 100 columns, in the February.xlsx file, there could […]

Read More →

Generate a list of all Excel files from a specific folder without using VBA

{ 56 Comments }

Assume a folder named Test on the desktop.  In this Test folder, there is another folder named Survey reports.  In the Survey reports folder, there are Word documents, PowerPoint files, Excel files, PDF files and all sort of other files types. In a new workbook, one may want to list down all Excel files from […]

Read More →

Generate a list of all tabs names without using VBA

{ 252 Comments }

Assume an MS Excel file has 4 worksheets – Sheet1, Sheet2, Sheet3 and Sheet4.  Insert a sheet before Sheet1 and name that tab as Summary.  On the Summary tab, one may want to generate a list of all sheet names from cell C7 onwards.  Furthermore, the sheet names so generated, should be dynamic for the following changes: 1. Sheets […]

Read More →

Conditional testing without lengthy nested IF functions

{ 0 Comments }

Many a times writing nested IF() statements become cumbersome, lengthy and highly prone to errors.  In worksheet named “Question”, one would like to avoid using spare columns for computation of landed value for the three product sources (“CKD”, “LMP”, “IMP”).  While one can use a nested IF() statement, it would be unmanageable because of the length of the […]

Read More →