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.

Good reading resource

If you are after a good book to read, this is a great resource with over 300 books listed, and ranked.

Derek Sivers has had an amazing life and I am a fan of his own books.

He has included ratings and notes of the books he has read.

You can sort the list by Title, Newest or Best.

https://sive.rs/book

Display a New Window

If you have two or more screens (I have three) you can have separate Excel windows on separate screens. This can make copying and linking much easier.

The keyboard shortcut to open a new window in the current file is Alt W N pressed in sequence not held down.

This allows you to have the same file visible in two separate windows. Each window can have a separate sheet.

The New Window icon is on the View ribbon tab.

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.

Input Data Display Hack for Excel

Getting the format white

When creating data input sheets, it is a good idea to use a table layout. Sometimes they can end up looking a little bit busy, especially if you are repeating entries down rows. To help users focus on what they need to do, you can use a little formatting hack to make the layout look a little less cluttered.

One Minute to Excel #23 – Text numbers to real number again

Another solution

One thing you learn quickly about Excel is that there are many ways to achieve the same outcome.

This is another example. In an earlier video I showed two separate ways to convert text numbers into real numbers.

Well, I have just learned another way. An Excel MVP Rick Rothstein shared a third way.  I tweaked it and share a keyboard shortcut to do it as well.

Hope you enjoy it.

Added Nov 27, 2021

If you use Text to Columns for other conversion in the same session, you may need to use Alt A E W F as the Delimiter defaults may interfere with the conversion.

 

Comma Format

The comma format for numbers is pretty popular.

There are a couple of keyboard shortcuts to apply it.

Hold the Ctrl and Shift keys down and press 1 on the keyboard.

The next one uses the Alt key. Use the left Alt key. Keys pressed in sequence (don’t hold them down).

Alt H K

Remember Hong Kong.

 

Old Macros XL4 macros

If you use the old Excel macro language – known as XL4 macros – you may need to update a setting to keep using them.

This is the macro language before VBA was introduced in the Excel 5 back in the 90’s.

Not many people use these macros any more but there a couple of techniques that they are used for.

Microsoft will soon disable them automatically and you will need to turn them back on if you want to use them.

The setting to update is in the Trust Center Macro settings – see image below.

 

Related Posts

 

 

One Minute to Excel #22 – Normalise a budget

Power Query can be quick

The standard budget layout isn’t great for pivot tables. You can easily and quickly convert it in to data using Power Query

See now in this short video.

Monitor Cells with Excel’s Watch Window

Don't wait, watch

When you are developing a file for a report, budget or forecast you may need to keep track of certain cells. They could be validations or profits or some other important value. The Watch Window can help you monitor multiple cells in one place.

In the Formulas tab in the Formula Auditing section is the Watch Window icon.

Clicking the icon opens the Watch Window. It will be blank.

You can click the Add Watch button to add a cell to monitor. You can chose cells from any sheet.

Click Add to watch the cell. You can widen the Watch Window and change column widths as well.

You can click the column headings to sort by the column.

You can also select a range to watch. but it will list the range as a series of cells – see images below.

When you save and close the file the watch entries are saved. When you open the file the Watch Window won’t be open, you will have to re-open it.

The shortcut Alt M W (pressed in sequence, not held down) will open the Watch Window. The same shortcut also closes the Watch Window.

 

One Minute to Excel #21 – Hiding Zeroes

Two ways

If you want to display a blank cell instead of a zero there are two ways to do it.

See both in this short video.