VBA find last column

In this lesson, I presented a few ways to get the last column number. The first methods are easy, but then the code…

Posted On

VBA sort range

In order to sort data inside a range in VBA, you have to use the following code. Sub Sort() Range(“A1:A10”).Sort key1:=Range(“A1”), order1:=xlAscending, Header:=xlNo…

Posted On

Check cell color in VBA

Each color in Excel has its index. You can get both background and font color with a shortcode. Let’s use the following example…

Posted On

Add text to cell in Excel

You can add text to a cell using ampersand “&”. First, find a cell you want to add text to. Next, enter the…

Posted On

Excel Add text based on cell value

To display text based on another cell, you have to use the conditional function IF. =IF(A2<51,”Bottom 50%”,”Top 50%”) The function displays the value…

Posted On