Category: MS Excel

Microsoft excel tips and tutorials

Combine multiple columns data to single column [Excel VBA]

combine-multiple-columns-data-to-single-column-excel-vba

If you want to combine multiple columns data to a single column using excel VBA, then use below code. Below macro combines data of 10 columns and displays it in first column. Change numOfColumns variable value as per your requirement.

Remove blank rows inside cell [excel VBA]

remove-blank-rows-inside-cell-excel-vba

We can create new line/row inside a cell by pressing ALT+ENTER in MS Excel. If you come across a situation where you want to remove blank rows/lines inside the cell, then you can’t remove them using trim method. Below code helps you to remove them automatically using VBA code.

In the above code Chr(10) […]

[Excel VBA code] Convert a string to Uppercase letters

excel-vba-convert-string-to-uppercase-output

Excel VBA code to convert a string to uppercase letters. It converts all lowercase letters to uppercase.

Output:

VBA macro to find duplicates in excel

macro-duplicates-highlighted-in-red

VBA macro to find duplicates in excel sheet. This macro finds the duplicates in user selected range and highlights them in light red color. VBA code to find and highlight duplicates

Add above code to your excel workbook How to use this macro Select the range (column/row/columns and rows…) in which you want to […]

Macro to extract file name from file path [Excel VBA]

Excel VBA macro to extract file name from file path. This macro extracts the string (file name) which is between dot (.) and backslash(\) delimiters (from right side).

VBA macro to delete empty columns in excel

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 […]

2 easy ways to compare cells string data in excel

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 […]

Check if a cell value contains capital letter in Excel

excel-function-to-check-cell-contains-capital-letter

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         […]

Page 1 of 212