Using Named Formulas In Excel – Like Yesterday()

What if there is a way to define new formulas in Excel without using VBA? One would be very skeptical of any such claims. But, believe it or not, it is true. Think about how easy such a technique would make your life. Not only would it allow you save a lot of time, the technique is also very handy in simplifying or restricting complex formulas to stop your audience from making blunders while using your files. Moreover, it’s extremely simple to do!

Our very own Excel expert Szilvia Juhasz has uncovered this life-saving functionality for the fans, giving us all the more reasons to thank her.

So, let’s see what the technique actually is.

1 – Name Manager

We all are aware of how we can name ranges using the Name Manager. Let’s review it:

  1. 1Select a range (or even a cell) with some data.
  2. Go to the Formulas tab, and click on Name Manager.
  3. Now click “New”.
  4. Type in any name, without spaces, for the range. We will use the name “ABC”.
  5. Now click “OK” and then click “Close”.
  6. In any cell outside the range ABC, type a sensible formula which can take ABC as an input. E.g., =PRODUCT(ABC).
  7. And you would see that it works perfectly well.

2 – Advantages of Named Ranges

There are 2 apparent advantages of using named ranges.

  1. We do not have to worry about selecting the range (especially if it is big) repeatedly and carefully. It only has to be done once, followed by naming it.
  2. If our workbook has many sheets, switching between sheets again and again to select different ranges can be a pain. Named ranges eases the process dramatically.

Also, if we give meaningful names to our ranges, worries about getting confused or memorizing the names go out the window.

3 – The Trick

The trick uses the Name Manager and some ingenuity. Let’s take an example: we have the formula TODAY() in Excel which returns today’s date. But we do not have a corresponding equivalent for yesterday, or even tomorrow for that matter. Well, with this trick, we do.

  1. 2Go to the Name Manager and click “New”.
  2. In the ‘Name’ box, type the name to be given to the function. It will be “Yesterday” for the sake of this example.
  • Now, in the ‘Refers to’ box, type the formula, which would be “=TODAY()-1” in this case.
  1. We can write any comments explaining the formula if we wish.
  2. Now click “OK” and then click “Close”.

4 – The Test

Go to any cell and type “=Yesterday”. And, there you have it!

Note that you do not need any parentheses in this case. Also, set the cell to any date format for it to appear like we would want.


What’s next?

Try it out! Now try it some more. Let’s make our lives simpler. And, share, share, share! Help the knowledge of your friends and colleagues grow.

Also, do comment below about any creative uses of this technique you might have come across.

Jamani Arsalan


You may also like

  • Here’s a good one, which you can give the name SHEETNAME, or (my preference) CURRENTSHEETNAME:


    You have to enter this PRECISELY the way it appears above, so copy/paste it folks. Also NB: “filename” is NOT a placeholder! it is to be typed as shown or this will not work.

    You will almost certainly need to Save your workbook BEFORE you add this function to it; I’ve only ever typed (or pasted) this into workbooks which had already been saved.

  • {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

    Free Power User Quick Guide

    Discover The BEST Ways To Use Lookups And Conditional Calculations Quickly And Easily With This Reference Guide -- You Won’t Want This To Leave Your Side

    With so many ways to use Excel, it can be difficult to memorize all of the key functions, calculations, and techniques you can employ to meet your goal: simply get the job done.