How to Grab All Text After The Last Occurence Using Excel

In a Microsoft Excel spreadsheet cell one can use a custom function to effectively grab all test after the final (last) occurrence of a particular character or string. This is accomplished by simply creating a Custom Function and then using that function in a cell formula. Following is the code and instructions for how to create and then implement the function.

Function PullAfterLast(rCell As Range, strLast As String)
PullAfterLast = Mid(rCell, InStrRev(rCell, strLast) + 1, 256)
End Function

  1. Highlight the above code, and copy it to the clipboard by pressing CTRL-C, or by right-clicking on the text and on the resulting popup window left-clicking on Copy.
  2. Open Microsoft Excel (or proceed to step 2 if you prefer to open Excel by clicking  the desired existing .xls file directly.).
  3. Open the workbook you wish to use the function with, or create a new workbook.
  4. Open the Visual Basic Editor window by pressing ALT-F11 on the keyboard, or clicking Tools > Macros > Visual Basic Editor
  5. Insert a new module by right-clicking on ThisWorkbook > Insert > Module or on the toolbar clicking Insert > Module
  6. Paste the clipboard contents (which is the code above this numbered procedure) into the code window by pressing CTRL-V, or by right-clicking in the code window and on the popup menu clicking on Paste, or by clicking the menu toolbar on Edit and clicking on Paste.
  7. Close the Visual Basic Editor by presing CTRL-Q, or by clicking File on the menu toolbar and then clicking Close and Return to Microsoft Excel.

The custom user defined function is now available to be used in the formulas of cells. To use it, the following syntax format is used in the cell’s formula:


Of course, replace yourstring with the appropriate character or string.

This info was combined from article about how to make custom functions easily, and article where Dave Hawley gave the universe this function’s code, many thanks!

Posted under Excel, Microsoft, Office

Set Windows clock to UTC time

Save the following lines as utc.reg, and then run it to import this registry tweak. It allows you to set the hardware clock in your PC’s BIOS to UTC time. This is handy for boot dual-booting Mac, or Linux, when those operating systems are set to read the BIOS clock as UTC time, instead of Windows’ preferred Local Time (ie. PST, PDT, MST, MDT, CST, CDT, EST, EDT, or the standard “GMT-” and “GMT+“)

Here is the code to save as utc.reg:

Windows Registry Editor Version 5.00


Posted under Apple, Linux, Microsoft

This post was written by Content Curator on October 30, 2007

Tags: , , , , , , , , , , , , , , , , ,

Registry editor for Windows Mobile and PocketPC devices

Thanks to G. Inglemo we have a really neat way to hack the registry on out Windows Mobile based devices. The check out the developer’s page for full info.

Also, you can download it from NTI.

Posted under Microsoft, Mobile

This post was written by Content Curator on March 9, 2007

Tags: , , , , , , , , , , ,