Recently, a reader wrote to me with the following query:
I have an Excel Workbook that includes several worksheets. As I move from sheet to sheet within the workbook, I would like the value of one particular cell in the first sheet to be visible in my status bar so that I can watch it as it recalculates as I make changes in the other worksheets. If this possible?
I did not readily know the answer to the query, but I did some researching and asked some experts and this is what I found and how I replied to the query:
- In MS Excel, click on Tools | Macros | Visual Basic Editor or the shortcut ALT + F11, which will open the Visual Basic Editor.
- Double-Click on ThisWorkbook on the left side and a module will open on the right-hand side.
- Add the code below in the ThisWorkbook module of your workbook and whenever the workbook recalculates it will put the contents of Sheet 1, Cell A1 (change as you like) in the status bar:
Private Sub Workbook_SheetCalculate (ByValSh As Object
Application.StatusBar = Worksheets (“Sheet”).Range(“A1”) Value
You can then save and close the Visual Basic Editor and you will now have your calculation visible in your status bar as it updates.