Floor and Ceiling Functions

While the ROUNDUP (round up to the nearest number, specifying the number of digits), ROUNDDOWN (round down to the nearest number, specifying the number of digits), and ROUND (round to nearest number up or down, specifying the number of digits) are very helpful, sometimes you wish to round up or down to a specific multiple.  Maybe you are dealing with large numbers and want to deal work only with multiples of 1,000 or 10,000.  Or maybe you’re building a graph or chart and want to minimize the scale.  The best way to do that, you decide, is to make the base (lower bound value) lower than, but as close to, the lowest number as possible.

No matter the reason, performing this is easy.  For each of them, you only need the number you are rounding and the multiple you’d like to round (up or down) to.  Examples follow:

Value: A1=1,798

Floor(A1,5)=1,795
Floor(A1,10)=1,790
Floor(A1,25)=1,775
Floor(A1,100)=1,700
Floor(A1,1,000)=1,000
Floor(A1,1,500)=1,500
Floor(A1,2,000)=0

Ceiling(A1,5)=1,800
Ceiling(A1,10)=1,800
Ceiling(A1,25)=1,800
Ceiling(A1,100)=1,800
Ceiling(A1,1,000)=2,000
Ceiling(A1,1,500)=3,000
Floor(A1,2,000)=0

YOY Comparison for Most Recent Days

Comparing Same Day Sales YOY

In my last post, Showing Activity for Most Recent Days, I showed you how to find the most recent date for which you have “totals” data.  We found that whether it’s support calls or sales made each day, being able to retrieve this information quickly and efficiently can be extremely helpful.   By using the ROUNDDOWN AND MAX functions, as well as the very powerful SUMPRODUCT,  we were able to create a quick summary of the most recent days’ activity. The obvious next question?  How do those days compare with the same time last year.  In other words, using the most recent data, how are things going compared to last year?

We already have the first several pieces of the puzzle, the current year’s sales information.  To compare the data to last year, we simply find the totals for the same dates in the previous year.  We can determine these dates these dates fairly easy by using the CONCATENATE formula, along with the popular and well known MONTH and YEAR formulas. Read more of this post

Showing Activity for Most Recent Days

I’m working on a dashboard for a company that sell tee shirts to high school sports programs.  They get their data from an online database which includes day and time of order as well as order amount. But, you could apply the same methodology to any data that is updated often, whether you are copying and pasting into Excel, importing from or linking to an Access database, or connecting to an ODBC data source. (Of course I didn’t use the company’s actual data; I used a cool trick to generate random dates and times for events for my sample data.)

At any given point, management of Acme SportsTees, Inc. would like to see the last 10 days of sales activity.  The trick to dashboards; and in my opinion, any process or task you are trying to automate; is removing from the process as much human involvement (thinking, typing, more thinking) as possible.  So, if you are able to connect directly to the data source, or at least reduce the actions required by the administrator to just copying and pasting, you will significantly reduce the opportunity for human error and a lot of headaches. Read more of this post