591 – An Excel Smörgåsbord

clip_image002Think of this week’s tip as not one single dish, but rather a series of related snacks; a groaning table of cold hors d’oeuvres or sizzling spicy tapas, with one common theme – they’re all about Excel.

May the F4 be with you

One of the neatest features in Office yet largely hidden; the F4 key repeats the last command without needing to faff about selecting the option from the menu. So what, you might say? Well, what if you’re formatting cells and want to repeat the same format over and over again – you could change one, then use the Format Painter option to apply that to select other cells, or possibly just apply the format you want, then select each additional cell in turn and press F4.

One slight downside is that it only repeats the very last action, so changing a number format and then making it bold wouldn’t be easily repeatable since those are two actions. Still, there are so many uses for this “Magic Key no one knows about”.

CTRL+y does the same thing in case you’ve got one of those annoying keyboards where the function keys do other things, you never know without looking if you’ll be pressing F4 or changing the system volume.

Layouts and Tabs

Now, Windows has lots of tricks for arranging application windows side by side, especially if you have multiple monitors; there’s a particularly shiny new way of doing it in Windows 11 with Snap Layouts. In the context of Excel, that’s OK if you’re using two spreadsheets side by side and you might want to reference or copy data between them, but Excel has its own window-handling functions that could be more useful.

clip_image004The key scenario here is that you can open the same document in more than one window (by clicking New Window, on the View tab) and then show different parts of it side/side – separate tabs, perhaps, or different areas on the same sheet.

The Synchronous scrolling feature means clip_image006you can also keep the cursor at the same point in both sheets, making it easier to compare. If you have functions on one tab that depends on data from another, you could change the data in one window and see its impact in real time in the other.

Click on the Arrange All menu option to automatically distribute the open Excel windows, optionally confining the process to just the windows from the active workbook.

Transpose data with paste

It’s a fairly common exercise to take a load of data that’s in one format and want to represent it differently; there is a useful Transpose feature that takes data from columns and paste it back as a row, or vice versa. One useful scenario could be when you want to take the names of everyone who got an email or meeting request and put them in a tabular format.

clip_image008Start by copying and pasting the names/addresses from Outlook’s To: field into a new cell: you’ll see that is’ one long string of text that needs to be broken down, but in this case, each address is delimited with a semicolon (“;”).

clip_image010Having selected the cell, go to the Data tab in Excel and choose Text to Columns then choose clip_image012Delimited and select the semicolon. Once the wizard is complete, you’ll end up with each address in its own column. Now select the multiple cells and copy to clipboard.

clip_image014Next, put the cursor on a lower row or maybe a new sheet altogether; right-click on the destination cell and under Paste Options, look for the Transpose icon (with the two arrows); hovering over the different icons in this menu will preview what you’re going to do. Click on the icon to commit.

Now you have a list of addresses on their own row, and without the “;”s, but they do have a leading space ahead of all but the first one. It might be quick to correct each line in turn, and there’s always the TRIM function which could be used to tidy stuff up through formulae.

clip_image016Alternatively, go back to the start of the process, select both Semicolon and space, and choose to combine the two, so the text in the columns is neater.

When you’re happy, remove the original line that had the text in columns, leaving just the separate email addresses on their own rows.

Now, snacks just make you hungry, don’t they?

542 –Excel Special Paste

clip_image002
Anyone who spends an amount of time preparing spreadsheets in Excel, will be familiar with the frustrations that can come from cut, copy & paste. You need to know what the source of a cell is before you know how it will behave if you copy and paste it somewhere else, even to another sheet.

As an example, if you took the small table below and wanted to copy and paste the calculated values on row 4, you’d need to deal with the fact that the formula will change – offsetting the D and the 2 reference to wherever you paste it (eg if you pasted the copy into E4, the formula would be =E2-E3) – normally, a powerful and useful function, but a potential nuisance.

clip_image004You could decide to paste just the value itself (which means that if the values in D2 and D3 changed, cell D4 would be recalculated but your copy would not), or you could copy the cell, then copy original cell’s formula and paste that into the formula of the destination cell.

clip_image006There are lots of “Paste Special” options, which will vary depending on what kind of data is in the clipboard. Right-click in a destination cell and the Paste Options menu will surface the commonly used variants, or click the arrow by Paste clip_image008Special to see all the others. Move the mouse over that pop-up menu and the rest will fade away.

An older UI for selecting the options is available if you click on the Paste Special… command at the bottom of the pop-out, or by pressing CTRL+ALT+V to pop out the Special dialog.

clip_image010Transposing

One of the more particularly useful features of Paste Special in Excel is the Transpose option – if you select and Copy a row of data then Paste / Transpose it, the data is rearranged as a column (and vice versa). Great news in many cases, but if you want to paste cells and keep the original formulae (without resorting to using absolute references formula references using $ in the formula itself, eg setting =$D$2-$D$3), there are no default options to transpose the orientation of the cells but not change the  formulae.

clip_image012

One trick if you ever find yourself in this position, is to bulk change the formulas so they won’t get modified when you paste the cells; do a Find & Replace to change = to something like #=.

After pasting and transposing, reverse the process to restore the formulaclip_image014.

clip_image016NB: this can be a little hit and miss depending on how you’re using cell names or references – you may find that it’s more reliable if the reference is made to a cell on a different worksheet.

It’s an edge case but could save you lots of time if you need to do it.

For most of us, getting to grips with shortcut keys in Excel would make things more productive – as well as numerous combos of CTRL-something, there are simple keys (like pressing F4, which repeats the very last command … so if you’ve just coloured a cell yellow, move the cursor to another cell and hit F4 to make that one yellow too… if you’re doing very repetitive things, this can save so much time).

There are also more complex sequences; press the ALT key in Excel (and other Office apps, too) to see the key combos that clip_image018invoke each command group on menus or the Ribbon – if you can’t remember the shortcut, just press ALT then the key for the menu you want, then the key on the menu that equates to the command you’re looking for.

clip_image020

A little bit of legacy/history – press ALT-E then S to jump to the Paste Special menu – why E? Even though it’s long gone, really old versions of Excel had an Edit menu, and the commands on any menu – in any application – that have an underscore under a letter (like Paste Special) are highlighting the key you can press to jump to that command.

So ALT E / S used to be the combo to get Paste Special circa Excel 2003, and it still exists today.

Tip o’ the Week 482 – Paste History

clip_image002[4]Back in 2012, three weeks before Super Saturday, ToW #133 talked about the Art of Cut ‘n’ Paste. How the widely-used CTRL-V keyboard shortcut for Paste can trace its roots back to a program co-developed by Butler Lampson, one of the “Dealers of Lightning” as a founder at Xerox PARC, and now a near-25-year Microsoftie and Technical Fellow. QED was a thing before Neil & Buzz set foot on the Moon (which happened on 21st July, not 20th: Eagle landed on the 20th, but it was 21st before “one small step for a man”… at least it was in UTC).

clip_image004[4]Did you know that in recent versions of Windows 10, there’s a useful new shortcut – WindowsKey+V?

It shows you the history of the clipboard, so you can quickly access something you’d previously copied; you can sync the clipboard between multiple machines (or phones), too.

clip_image006[4]There are other controls you can assert when it comes to pasting stuff, too – CTRL+ALT+V in Office apps will let you paste something and decide how to handle it (the equivalent of Paste Special, in most cases) and you can over-ride the default behaviour in  Word too, by choosing to Set Default Paste.

clip_image008[4]In other apps, there may still be different ways of handling Paste actions – Paul Thurrott recently wrote about how to change the options in OneNote for Windows 10 (the UWP app that is replacing traditional OneNote; the one you can start by running onenote-cmd: from the Win+R box).

The “copy & paste” metaphor dates to PARC, too – and yet it’s still evolving, 45 years later.