On this site you find the sub’s and functions I use the most. You will find code snippets ready to use, usage examples in addition to Workbooks with more or less complete VBA projects. The code is not the right way, it’s my way.
Ketil Melhus
Excel consultant Ketil Øyesvold Melhus I am a psychotherapist and system developer – where the common denominator for the two professions is diagnostics.
MS365: excel formula for last used row number. The LUR() function
The LUR (Last Used Row) function is a LAMBDA function, so no macros involved. It works on MS365 / Excel Online. Purpose is simple –…
Excel VBA: Create a series of workdays only
The Nextworkday(date, optional holidays) function returns the date for the next workday. The first parameter is the starting date you set manually.The second parameter is…
Excel VBA – Create and update Outlook Calendar Items
With the Sub UpdateAppointment you can create and update Outlook meetings or appointments. All items must have a unique index to filter on. The sub…
Excel VBA: Working with shapes and Pythagoras
This was a fun exercise. How to place a random number of dots on a circles circumference with exact the same distance between them? The…
Excel VBA: CopyUsedRangeValues – fastest way to copy values from sheet to sheet.
RunCopyUsedRangeValues will copy the values from the sheet with codename shSource to shDestination. It is extremely fast, and very useful when I don’t need formatting…
Excel VBA: Subroutines for speed optimization
Sub AppOnOff Sub AppEv Sub AppCal Sub AppSc You can download the Excel workbook with the sample code at the end of this Article Sub…
Hour registration in Excel with calculation of time within intervals
If you work from 20:15 to 02:30 on a Saturday, how many hours are in the interval 15:30 to 00:00, and what should you be…
Function fR() – Return row number where Content is found in Column with specified Header
Usage example Video sample Function code The function fR is part of My Common Library: My Common Library (1 download)
Function ffC() – Find first free column in first row
Usage example Function Code The function ffC is part of My Common Library:
Multi Language Excel Invoice Template
Beware this is an unfinished project – and you are free to finish it. If you are looking for a out of the box invoice…
Function findContent()
Find content in column1 with header xx, return value from same row in column2 with header yy. Note The function returns 0 (Zero) when value…
Function ffR() – Find First Free Row
When I want to add a new record to a table, I use the function CurrentRegion.Rows.Count and add 1 to the result to find the…