'VBA' category


Subcategories

  • Arrays (3)
  • Check-boxes (6)
  • Combobox (5)
  • Dialog boxes (1)
  • Files and folders (14)
  • Form Controls (6)
  • Functions (7)
  • Listbox (3)
  • Macro (78)
  • Methods (3)
  • Print (5)
  • Properties (1)
  • Recursive (1)
  • Regular expressions (4)
  • Statements (19)
  • Text boxes (1)
  • User Defined Function (29)
  • Worksheet (2)

  • Excel VBA functions
    Table of Contents Functions How to use the ARRAY function How to use the FIX function How to use the […]
    How to use the RANGE.FIND method
    The Range.Find method returns a range object for the first cell that matches the lookup value. Macro used in workbook above The […]
    Copy data from workbooks in folder and subfolders
    I will in this article demonstrate a macro that automatically opens all workbooks in a folder and subfolders, one by […]
    How to copy non contiguous cell ranges
    Table of Contents How to copy non contiguous cell ranges How to copy every n-th row from a list 1. […]
    Search for a file in folder and subfolders [UDF]
    Table of Contents Search for a file in folder and sub folders - User Defined Function Search for a file […]
    How to use the DO LOOP statement
    The Do Loop statement allows you to repeat specific code until a condition is met. There are two possible ways […]
    How to use the FOR NEXT statement
    Table of Contents FOR NEXT statement FOR NEXT with a counter variable FOR each NEXT example FOR NEXT with counter […]
    How to use the IF THEN ELSE ELSEIF END IF statement [VBA]
    This article demonstrates how to use the If ... Then statement in Visual Basic for Applications (VBA). You can combine […]
    User opens or closes a workbook creates an event
    This article explains how to set up a workbook so a macro is run every time you open the workbook. […]
    Count matching strings using regular expressions
    This article demonstrates a User Defined Function (UDF) that counts how many times a string exists in a cell value […]
    Split search value using a delimiter and search for each substring
    This article demonstrates formulas and a UDF that searches for values in a table based on concatenated values and returns […]
    Fetching values from ThingSpeak programmatically
      Picture above shows cheap chinese IoT modules: a temp sensor and an esp8266-01 (25 mm x 15 mm) Thingspeak […]
    Extract cell references from a formula
    This article demonstrates a User Defined Function that allows you to extract cell references from a formula in a given […]
    How to use the LIKE OPERATOR
    The LIKE operator allows you to match a string to a pattern using Excel VBA. The image above demonstrates a […]
    How to use DIALOG BOXES
    A dialog box is an excellent alternative to a userform, they are built-in to VBA and can save you time […]
    Working with ARRAY VARIABLES (VBA)
    This post will teach you how to work with Excel arrays in visual basic for applications (VBA). Why do you […]
    Multiply numbers in each row by entire cell range
    This article demonstrates a recursive LAMBDA function and a User Defined Function (UDF) that multiplies numbers in each row with […]
    Resize a range of values (UDF)
    The User Defined Function (UDF) demonstrated in this article, resizes a given range to columns or rows you specify. This […]
    A beginners guide to Excel array formulas
    Array formulas allows you to do advanced calculations not possible with regular formulas.
    Find and replace strings in file names, folder name and subfolders
    The following two macros FindReplace() and Recursive() let you rename files and folders recursively based on a search string. The […]
    Working with LIST BOXES (Form Controls)
    This blog post shows you how to manipulate List Boxes (form controls) manually and with VBA code. The list box […]
    List all hyperlinks in worksheet programmatically
    The macro in this blog post lists all hyperlinks in a worksheet. It also lists all words beginning with "http" […]
    Filter duplicate files in a folder and subfolders
    This is a follow up to my last post Compare file names in two different folder locations and their subfolders, the obvious […]
    Compare file names in two different folder locations and their sub folders
    Today I would like to share a macro that compares the content in two different folders and their subfolders. It […]
    How to save specific multiple worksheets to a pdf file programmatically
    This article demonstrates macros that save worksheets to a single pdf file. What's on this webpage Export all worksheets in […]
    Find cells containing formulas with literal (hardcoded) values
    This article describes different ways to locate literal or hardcoded values in formulas. The image above shows the result from […]
    Find the most/least consecutive repeated value [VBA]
    This post Find the longest/smallest consecutive sequence of a value has a few really big array formulas. Today I would like to […]
    How to use the TEXTTOCOLUMNS method
    The TextToColumns method puts a cell that contains a string into substrings and distributes them horizontally using a delimiting character […]
    How to count the number of values separated by a delimiter
    This article demonstrates formulas that count values in cell based on a delimiting character. The image above shows a formula […]
    Search all workbooks in a folder and sub folders – VBA
    This article demonstrates macros that allow you to search for a text string(s) in multiple worksheets and workbooks located in […]
    Working with comments – VBA
    Did you know that you can select all cells containing comments in the current sheet? Press F5, press with left […]
    Working with Excel tables programmatically
    The image above demonstrates a macro linked to a button. Press with left mouse button on the button and the […]
    How to highlight row of the selected cell programmatically
    Today I would like to share with you these small event handler procedures that make it easier for you to […]
    Finding the shortest path – A * pathfinding
    What's on this page Finding the shortest path - A * pathfinding Optimize pick path in a warehouse   1. […]
    Move data to workbooks
    This article demonstrates a VBA macro that saves user input to a given workbook and worksheet programmatically. Macros are great […]
    Print screen the entire worksheet
    This article demonstrates different techniques on how to take a screenshot of your worksheet. You can do that by simply […]
    Customize Excel maze
    Terry wants to make a different sized maze and I think that is a great idea. Perhaps you remember that I […]
    Multi-level To-Do list template
    Today I will share a To-do list excel template with you. You can add text to the sheet and an […]
    Search all workbooks in a folder
    Today I'll show you how to search all Excel workbooks with file extensions xls, xlsx and xlsm in a given folder for a […]
    Customize the ribbon and how to add your macros
    Save links to your favorite macros in a personal tab on the ribbon for easy access and become more productive. […]
    Remove print preview lines (Page Breaks)
    Have you ever wondered how these lines got there on a worksheet? They are called "print preview lines" and they […]
    Working with TEXT BOXES [Form Controls]
    There are two different kinds of text boxes, Form controls and ActiveX Controls. Form controls can only be used on […]
    Show / hide a picture using a button
    This article explains how to hide a specific image in Excel using a shape as a button. If the user […]
    Hide specific worksheets programmatically
    This article demonstrates techniques to hide and unhide worksheets programmatically. The image above shows the Excel window and the worksheet […]
    How to use the Scroll Bar
    This article demonstrates how to insert and use a scroll bar (Form Control) in Excel. It allows the user to […]
    Count unique distinct values by cell color
    This article demonstrates a User Defined Function (UDF) that counts unique distinct cell values based on a given cell color. […]
    Highlight date ranges overlapping selected record [VBA]
    This article demonstrates event code combined with Conditional Formatting that highlights overlapping date ranges based on the selected date range. […]
    Which Excel files in folder are password protected?
    This article explains how to check if Excel files in a given folder are password protected. The image above shows […]
    Count text string in all formulas in a worksheet [VBA]
    I will in this article demonstrate a macro that counts how many times a specific text string is found in […]
    Locate a shape in a workbook
    This article demonstrates how to locate a shape in Excel programmatically based on the value stored in the shape. The […]
    Working with FILES
    In this blog article, I will demonstrate basic file copying techniques using VBA (Visual Basic for Applications). I will also […]
    How to change a picture in a worksheet dynamically [VBA]
    Rahul asks: I want to know how to create a vlookup sheet, and when we enter a name in a […]
    Move a shape [VBA]
    This article demonstrates how to move a shape, a black arrow in this case, however, you can use whatever shape […]
    Lookup multiple values in one cell
    This article explains how to perform multiple lookups based on values in one cell with a delimiting character using a […]
    Run a Macro from a Drop Down list [VBA]
    This article demonstrates how to run a VBA macro using a Drop Down list. The Drop Down list contains two […]
    Copy worksheets in active workbook to new workbooks
    This article demonstrates several VBA macros, they will save you time if you have lots of worksheets. The first macro […]
    Excel calendar
    Table of Contents Excel monthly calendar - VBA  Calendar Drop down lists Headers Calculating dates (formula) Conditional formatting Today Dates […]
    Extract cell references populated with values [VBA]
    This article demonstrates a macro that returns cell references for cell ranges populated with values on a worksheet. Jinesh asks: […]
    Sort values in a cell based on a delimiting character
    This article demonstrates a macro and a formula that allows you to sort delimited data in a cell or cell […]
    Create links to all sheets in a workbook programmatically
    The macro demonstrated above creates hyperlinks to all worksheets in the current worksheet.  You will then be able to quickly […]
    Create new worksheets programmatically based on values in a cell range [VBA]
    This article demonstrates a macro that inserts new worksheets based on names in a cell range. The cell range may […]
    List files in folder and create hyperlinks (VBA)
    Table of Contents List files in a folder and create hyperlinks (VBA) How to navigate quickly in a complex workbook […]
    How to create an interactive Excel chart [VBA]
    This article describes how to create an interactive chart, the user may press with left mouse button on a button […]
    Prepare data for Pivot Table – How to split concatenated values?
    This article demonstrates a macro that allows you to rearrange and distribute concatenated values across multiple rows in order to […]
    Excel template: Getting Things Done [VBA]
    In this article, I am going to demonstrate a simple workbook where you can create or delete projects and add […]
    Add values to a two-dimensional table based on conditions [VBA]
    This article demonstrates how to place values automatically to a table based on two conditions using a short macro. Cell […]
    Add or remove a value in a drop down list programmatically
    This article demonstrates how to add or remove a value in a regular drop down list based on a list […]
    Open Excel files in a folder [VBA]
    This tutorial shows you how to list excel files in a specific folder and create adjacent checkboxes, using VBA. The […]
    Toggle a macro on/off using a button
    This article demonstrates how the user can run a macro by press with left mouse button oning on a button, […]
    Automate data entry [VBA]
    This article demonstrates how to automatically enter data in cells if an adjacent cell is populated using VBA code. In […]
    Apply drop-down lists dynamically
    This article demonstrates how to automatically create drop-down lists if adjacent data grows, there are two methods explained here. The […]
    Auto resize columns as you type
    What's on this page Auto resize columns as you type - VBA Press with left mouse button on a cell […]
    Copy a dynamic cell range [VBA]
    In this blog post, I will demonstrate some VBA copying techniques that may be useful if you don't know the […]
    Working with COMBO BOXES [Form Controls]
    This blog post demonstrates how to create, populate and change comboboxes (form control) programmatically. Form controls are not as flexible […]
    Extract unique distinct values in a filtered list
    This article demonstrates two formulas that extract distinct values from a filtered Excel Table, one formula for Excel 365 subscribers […]
    Add checkboxes and copy values – VBA
    Table of Contents Add Checkboxes to a Worksheet Copy selected rows based on check boxes Worksheet data VBA code Where […]
    Add values to a regular drop-down list programmatically
    Table of Contents Add values to a regular drop-down list programmatically How to insert a regular drop-down list Add values […]
    Rearrange data
    Sean asks: Sheet1A B C D 8 Country Europe 9 Lights 100 10 Type A 200 11 12 Country USA […]
    Two-way lookup in multiple cross reference tables simultaneously
    This article describes two ways to perform lookups in multiple in multiple cross reference tables simultaneously. The first one being […]
    How to save custom functions and macros to an Add-In
    Table of Contents How to save custom functions and macros to an Add-In How to add a custom-made item to […]
    Analyze word frequency in a cell range
    This article demonstrates two ways to calculate the number of times each word appears in a given range of cells. […]
    Create a Print button – macro
    This article describes how to create a button and place it on an Excel worksheet, then assign a macro to […]
    Save invoice data – VBA
    Table of contents Save invoice data - VBA Invoice template with dependent drop down lists Select and view invoice - […]
    Apply dependent combo box selections to a filter
    Josh asks: now if i only knew how to apply these dependent dropdown selections to a filter, i'd be set. […]
    Filter unique strings from a cell range
    This blog post describes how to create a list of unique words from a cell range. Unique words are all […]
    Split data across multiple sheets – VBA
    Table of Contents Split data across multiple sheets - VBA Add values to worksheets based on a condition - VBA […]
    Find missing numbers
    Table of Contents Find missing numbers in a column based on a given range Find missing three character alpha code […]
    Split values equally into groups
      Table of Contents Split values equally into groups Rearrange values based on category - VBA 1. Split values equally […]
    Print consecutive page numbers across multiple worksheets
    This article describes how to print page numbers in consecutive order through specified worksheets and how to repeat column headers […]

    Excel categories