Matchtype=-1は、ルックアップ配列が降順で並べ替えられている場合に、ルックアップ値以上の最小一致を返します (近似一致)。 次のコード例は、VLOOKUPおよびHLOOKUP関数の構文です。 詳細については、WorksheetFunctionオブジェクトのVLOOKUPおよびHLOOKUPメソッドを参照し...
Sub DeleteBlankRows() Dim x As Long With ActiveSheet For x = .Cells.SpecialCells(xlCellTypeLastCell).Row To 1 Step -1 If WorksheetFunction.CountA(.Rows(x)) = 0 Then ActiveSheet.Rows(x).Delete End If Next End With End SubHighlight Duplicate Values in SelectionUse this simple macro to high...
("A1").Value'Remove the spaces between the file names.sFile = WorksheetFunction.Substitute(sFile," ","")'Go through each file in the list (separated by commas) and'create the path, call the executable, and move on to the next comma.DoWhileInStr(sFile,",") sTxt = sPath &"\"& Left...
WorksheetFunction.IsText(Range("a2").Value) Then _ MsgBox "セルはテキストです"また、ユーザー定義関数(UDF)を独自に作成することも可能です。以下では、TRUEを返す単純なブール関数を作成します。そして、If文の中でその関数を呼び出します。