This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function FindColumn(headerText As String, Optional sheetToSearch As Worksheet, Optional headerRow As Integer) As Integer | |
Dim foundCell As Range | |
If headerRow = 0 Then headerRow = 1 | |
If sheetToSearch Is Nothing Then Set sheetToSearch = ActiveSheet | |
Set foundCell = sheetToSearch.Rows(headerRow).Find(what:=headerText, lookat:=xlWhole) | |
If Not foundCell Is Nothing Then | |
FindColumn = foundCell.Column | |
Else | |
Err.Raise Number:=vbObjectError + 1000, Source:="FindColumn", _ | |
Description:="Column not found: headerText=""" & headerText & _ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function FindWorksheet(sheetName As String) As Worksheet | |
Dim ws As Worksheet | |
For Each ws In ThisWorkbook.Worksheets | |
If ws.Name = sheetName Then Set FindWorksheet = ws | |
Next | |
End Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function FindLastColumn(Optional sheetToSearch As Worksheet) As Long | |
If sheetToSearch Is Nothing Then Set sheetToSearch = ActiveSheet | |
On Error GoTo handler | |
FindLastColumn = sheetToSearch.Cells.Find("*", SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column | |
Exit Function | |
handler: | |
FindLastColumn = 1 ' No data on sheet | |
End Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function FindLastRow(Optional sheetToSearch As Worksheet) As Long | |
If sheetToSearch Is Nothing Then Set sheetToSearch = ActiveSheet | |
On Error GoTo handler | |
FindLastRow = sheetToSearch.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row | |
Exit Function | |
handler: | |
FindLastRow = 1 ' No data on sheet | |
End Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
set backspace=indent,eol,start | |
set nobackup | |
set mouse=a | |
set confirm | |
" Windows settings | |
source $VIMRUNTIME/mswin.vim | |
behave mswin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:s/\(\s*\w\+\).*/\1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATEADD(d, DATEDIFF(d, 0, @date), 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATEADD(s, -1, DATEADD(d, 1, DATEADD(d, DATEDIFF(d, 0, @date), 0))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[-+]?[0-9]*\.?[0-9]+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:%s/\s\+$// |
NewerOlder