Notes from my daily work involving SharePoint, Excel and other Office applications.
Monday, July 23, 2012
Saturday, June 9, 2012
Get Help With Excel From an Expert
Need help fixing or updating your Excel workbook - or perhaps a completely new tool for your business? Call or email an Excel expert at hello@excelstudio.fi or +358 45 854 3003
Visit the website at http://excelstudio.fi (site currently only in Finnish)
Friday, June 8, 2012
Excel Shortcut: Open VBA Editor's Immediate Window
Ah the number of time's you've hoped that the VBA Editor's Immediate window could be attached to Excel's own window. That's not going to happen soon I think, so here's a tip how to quickly open and activate the Immediate window with some shortcut keys:
Alt + F11 Ctrl + G
Alt + F11 opens VBA Editor and Ctrl + G activates the Immediate window. Convenient way to help your spreadsheet editing especially with short single-line macros.
Alt + F11 Ctrl + G
Alt + F11 opens VBA Editor and Ctrl + G activates the Immediate window. Convenient way to help your spreadsheet editing especially with short single-line macros.
VBA: Break All External Links in a Workbook
Here's a tip how to break all external links from a workbook:
Sub BreakAllLinks()
Dim arrStrLinks As Variant
' Read workbook links to an array.
arrStrLinks = ActiveWorkbook.LinkSources(Type:=xlLinkTypeExcelLinks)
' Loop through whole array -> all links.
For i = 1 To UBound(arrStrLinks)
ActiveWorkbook.BreakLink _
Name:=arrStrLinks(i), _
Type:=xlLinkTypeExcelLinks
Next i
End Sub
This is actually a slightly modified version of the one you can find from Excel's help with keyword BreakLinks.
Sub BreakAllLinks()
Dim arrStrLinks As Variant
' Read workbook links to an array.
arrStrLinks = ActiveWorkbook.LinkSources(Type:=xlLinkTypeExcelLinks)
' Loop through whole array -> all links.
For i = 1 To UBound(arrStrLinks)
ActiveWorkbook.BreakLink _
Name:=arrStrLinks(i), _
Type:=xlLinkTypeExcelLinks
Next i
End Sub
This is actually a slightly modified version of the one you can find from Excel's help with keyword BreakLinks.
Wednesday, May 30, 2012
Excel Shortcut: Add Date or Time to Cell
To quickly add current date to active cell press CTRL + SEMICOLON (i.e. CTRL + ; )
To add current time press CTRL + COLON (i.e. CTRL + : )
To add current time press CTRL + COLON (i.e. CTRL + : )
Monday, May 28, 2012
VBA: Remove All Shapes From Sheet
To remove all shapes from a sheet, use the below snippet:
Sub RemoveShapes()
Dim s As Shape
For Each s In ActiveSheet.Shapes
s.Delete
Next s
End Sub
Sub RemoveShapes()
Dim s As Shape
For Each s In ActiveSheet.Shapes
s.Delete
Next s
End Sub
Friday, May 11, 2012
Excel: Count Unique (Number) Values
To count the unique number values in a range, say for example column A, you can use a combination of SUM, IF and FREQUENCY formulas.
Example:
=SUM(IF(FREQUENCY(A:A;A:A)>0;1))
Check the help for more details on FREQUENCY formula.
Example:
=SUM(IF(FREQUENCY(A:A;A:A)>0;1))
Check the help for more details on FREQUENCY formula.
Subscribe to:
Posts (Atom)