Excel VBA macro to delete empty columns. Just run this macro, enter number of columns you want to check and the macro checks (starting from first column) and deletes all empty columns within the selected number of columns. In the macro, you can also find VBA syntax to delete empty row and to check whether a […]
Category: MS Excel
Microsoft excel tips and tutorials
This article explains how to compare two cells of text string value. There are two easy ways to compare the cells having text strings in excel. Using EXACT function This function compares two text strings and returns TRUE if they are exactly equal, FALSE otherwise. EXACT function does case sensitive comparison/match i.e. it treats Why […]
If you want to check if a cell value (text string) contains at least one uppercase letter in excel, then use below function. =NOT(EXACT(LOWER(A1),A1)) Note: A1 is the cell number Above function returns TRUE if the cell value contains atleast one uppercase letter FALSE if the cell value has all lowercase letters […]
VBA macro to delete empty rows in excel sheet. This macro does below steps It selects “A1” cell i.e. first row It asks the user to enter the number of rows that he wants to check It checks whether row is empty or not if the row is empty, then it deletes the entire row […]
VBA macro to remove duplicates from each individual column in excel sheet. This simple macro, just single line syntax, treats each column as a separate entity and removes all duplicates from each column and keeps only unique values. Also see VBA macro to delete empty columns VBA macro code to remove duplicates from each column Sub removeDuplicatesFromEachIndividualColumn() ‘ […]
Below is the macro if you want to search for multiple strings within an excel cell check if a cell contains multiple text strings check if a cell contains one or more sub-strings I used four strings to search for in below macro, you can increase or decrease the count based on your requirement. VBA […]
Simple VBA macro code to remove special characters from a string in excel. You can remove either all special characters or choose which special characters to remove from the string. This macro retrieves each character from the string and checks whether it belongs to A-Z,a-z,0-9 or a space.If it belongs then it stores them into another […]
Use below VBA macro to “select all shapes” within a current excel sheet. Sub selectAllShapesInExcel() ActiveSheet.Shapes.SelectAll End Sub Advantages Saves your time of selecting the shapes manually
Excel VBA macro to save each sheet in a workbook to seperate CSV files.The macro creates seperate CSV file (with sheet name) for each sheet of workbook. Note: Before you run the below macro, change “C:\test\” in 12th line to your folder path where you want to save the created CSV files for each worksheet. […]
If you want to open two excel files side by side (or) in two different windows to make it easy for file comparison or to find the differences between them, then follow below steps. I saw few people struggling when they want to do something (compare/copy-paste/finding differences) between two excel files. They open two excel […]