Skip to content
- Excel VBA IsBlank Function? (No, Use IsEmpty)Excel VBA does not have a built-in IsBlank function. The function you are looking for is IsEmpty, which checks whether a variable…VBA & macros
- Excel VBA Integer Subscript Out of Range Fix“Integer subscript out of range” in Excel VBA means your code tried to access an array element or collection item that doesn’t…VBA & macros
- Excel VBA Index Match Multiple CriteriaYes, you can use VBA to perform an INDEX/MATCH lookup with multiple criteria by building a helper column or by using an…VBA & macros
- Excel VBA Import Data: How to & Common FixesTo import data in Excel using VBA, the quickest method is to use the Workbooks.Open method for external files or the QueryTables.Add…VBA & macros
- Excel VBA Index Match: How to Use ItThe direct answer: in Excel VBA, you use Application.WorksheetFunction.Index and Application.WorksheetFunction.Match together to replicate the INDEX/MATCH formula, for example Application.WorksheetFunction.Index(Sheet2.Range("B2:B100"), Application.WorksheetFunction.Match("Widget", Sheet2.Range("A2:A100"),…VBA & macros
- Excel VBA If Then Statement: Syntax & ExamplesThe Excel VBA If Then statement lets you run code only when a condition is true, with optional ElseIf and Else branches…VBA & macros
- Excel VBA If Then Else Statement SyntaxThe core syntax of the Excel VBA If Then Else statement is: If condition Then statements [Else elsestatements] for a single line,…VBA & macros
- Excel VBA If Statement Based on Cell ValueThe quickest way to run an Excel VBA If statement based on a cell value is to read the cell into a…VBA & macros
- Excel VBA Group Worksheets: How to Group & UngroupTo group worksheets in Excel VBA, use the Sheets collection and set the Select property on multiple sheets, or set the Worksheets…VBA & macros
- Excel VBA Get Last Row with Data in ColumnThe fastest way to get the last row with data in a specific column using Excel VBA is Cells(Rows.Count, "A").End(xlUp).Row for column…VBA & macros
- Excel VBA Goto Statement: Syntax, Risks, and AlternativesThe Excel VBA Goto statement jumps execution to a labeled line within the same procedure. It is a legacy control-flow tool that…VBA & macros
- Excel VBA: Get Last Used Row (3 Ways)The fastest way to get the last used row in Excel VBA is Cells(Rows.Count, 1).End(xlUp).Row, which returns the last non-empty row in…VBA & macros
- Excel VBA: Get Last Row with Data (3 Ways)The quickest way to get the last row with data in Excel VBA is Cells(Rows.Count, 1).End(xlUp).Row, which returns the row number of…VBA & macros
- Excel VBA Get Last Row in Column: 4 WaysThe fastest way to get the last used row in a column with Excel VBA is Cells(Rows.Count, "A").End(xlUp).Row, which returns the row…VBA & macros
- Excel VBA Get Cell Format: Read & Use ItTo get a cell’s format in Excel VBA, use the NumberFormat property of the Range object, for example: MsgBox Range("A1").NumberFormat. This returns…VBA & macros
- Excel VBA Format Text: How to Change Cell FormattingTo format text in Excel VBA, you use the Range.Font and Range.NumberFormat properties. For example, Range("A1").Font.Bold = True makes the text bold,…VBA & macros
- Excel VBA Format String Length Dim StatementIn Excel VBA, to declare a variable that holds a formatted string, you use the Dim statement with As String, and you…VBA & macros
- Excel VBA Format Command: How to Use ItThe Excel VBA Format command converts a value into a string with a specified number or date format, and you use it…VBA & macros
- Excel VBA Format Cell Borders: A Complete GuideTo format cell borders in Excel VBA, use the Borders property of a Range object, setting properties like LineStyle, Weight, and Color.…VBA & macros
- Excel VBA: Format Cell Text Bold (Easy Steps)To format a cell’s text as bold in Excel VBA, use the Font.Bold property: Range("A1").Font.Bold = True. This single line of code…VBA & macros
- Excel VBA Format Cell Bold: The Complete GuideTo bold a cell in Excel VBA, use the Font.Bold property: Range("A1").Font.Bold = True. This single line of code toggles bold formatting…VBA & macros
- Excel VBA Format Cell as Date: 4 WaysTo format a cell as a date in Excel VBA, set the cell’s NumberFormat property to a date format string, for example…VBA & macros
- Excel VBA Format Cell as Text: 3 Easy WaysTo format a cell as text in Excel VBA, set the cell’s NumberFormat property to "@", as in Range("A1").NumberFormat = "@". This…VBA & macros
- Excel VBA Format Cell as Percentage: Full GuideTo format a cell as a percentage in Excel VBA, set the cell’s NumberFormat property to "0.00%" (or "0%" for no decimals).…VBA & macros
- Excel VBA File Save As: Complete GuideThe direct answer: in Excel VBA, use ActiveWorkbook.SaveAs with a file path and format number, e.g., ActiveWorkbook.SaveAs "C:\Folder\File.xlsx", 51. This method saves…VBA & macros
- Excel VBA Format Cell as Currency: Full GuideTo format a cell as currency in Excel VBA, set the cell’s NumberFormat property to a currency format string, such as Range("A1").NumberFormat…VBA & macros
- Excel VBA File Save As Dialog: How to UseThe Excel VBA File Save As dialog is opened with the Application.GetSaveAsFilename method, which displays the standard Windows Save As dialog and…VBA & macros
- Excel VBA Export Data: How to Save Ranges, Sheets, and FilesTo export data from Excel with VBA, you write a macro that copies a range or worksheet and saves it to a…VBA & macros
- Excel VBA End Select: Syntax, Uses, and PitfallsThe End Select statement in Excel VBA closes a Select Case block, marking the end of the conditional structure. Without it, your…VBA & macros
- Excel VBA End If Statement: How to Use ItThe End If statement in Excel VBA closes an If...Then...Else block, telling the compiler where the conditional logic ends. You must include…VBA & macros