Percentage of the Year in Excel

As we get used to the new year we may want to perform some calculations based on the old year. A recent inquiry requested a formula that could calculate the percentage of a year that an employee had been employed. He suggested using an IF function. See the solution below, but it doesn’t involve the IF function.

Date Alignment Trick in Excel

Text alignment in Excel is versatile. If the column isn’t wide enough to display the text, it will display over the next cell. Date and number alignments are not so forgiving. If the column isn’t wide enough the cell with display the ### symbols or the scientific format. Here is a function technique to get around the limitation.

One Minute to Excel #26 – Fix AutoSum’s Weakness

Get the right range every time

AutoSum’s cryptonite is a blank cell – it stops AutoSum in its tracks every time.

Here’s how you can avoid AutoSum’s blind spot.

Adding up Text Numbers In Excel Another Technique

If you have a list of numbers that are a text numbers or a combination of text numbers with real numbers there is a technique I covered in this blog post to add them up. But if the range also contains text then the technique won’t work. There is the work around. The solutions below work in the subscription version of Excel. Check the comments section below for a solution for all versions.

Working with a Different Working Week in Excel

International functions to the rescue

Let’s say you are transitioning to retirement (lucky you) and you only work four days a week. You have Wednesdays off to play golf. You may still do projects and you need to figure out completion dates based on a start date and working days. Excel can help you.

Switching Reports from Rows to Columns in Excel

TRANSPOSE and OFFSET solution

I was recently helping someone with a budget which they had built vertically, with the months going down the sheet. They then asked to display it horizontally, with the months going across the page. In the latest version of Excel this is straightforward.

Conditional Format to Display Only the First Entry

In my previous blog post I showed a technique to reduce clutter. The technique used a manual formatting method. Here is the automated version.

You can see my previous post here.

Below is the original table.

We can use a Conditional Format to only display the first entry of each date in the Date column.

Select the range A2:A11.

Click the Conditional Formatting drop down and select New Rule (third from the bottom).

Select the last option in the top section “Use a formula to …”.

In the formula box enter the following formula.

=COUNTIF($A$2:A2,A2)>1

Click the Format button and use the Font tab and change the font colour to White and click OK and then OK again.

The result is shown below.

The formula for a conditional format must return TRUE to trigger the format. The type of formula that you use is called a logical test, which returns either TRUE or FALSE.

The use of the $ signs is very important in this formula. The COUNTIF function counts the number of entries in a range. If the COUNTIF result is above 1 it is a duplicate. In cell A2 the formula will ALWAYS return 1 as it is counting itself.

When creating a formula-based condition across a range you need to build the formula to refer to the top left cell of the range. In this case we need the range to expand as the range extends down the sheet. Hence, we didn’t use any $ signs on the last two A2 references used.

In cell A3 the formula will be.

=COUNTIF($A$2:A3,A3)>1

This is because the A2 references in the original formula had no $ signs, so they will change with the cell to A3. In our case this COUNTIF will return 2 because the date in cell A3 is a duplicate of the date in A2. This will trigger the format.

This formula expands as the range extends. It uses the cell reference of the cell it is in to determine if the entry is the first entry or a duplicate. This formula will not change the format of the first entry, but it will change the formats of any duplicates.