Excel VBA to select the first cell in a range

Top left cell

If you need to refer to the first cell (top, left cell) in a range there is an easy way to do it.

Let’s say you only want to change a single cell, the first cell in the selected range.

Maybe the user is only supposed to select a single cell, so you will only change one cell.

Even if the user has selected a large range you only want to handle the first cell in the top left corner of the range.

To refer to the first cell in the selected range you can use the statement.

Selection(1)

That’s it – easy.

If you want to make it bold use

Selection (1).Font.Bold = True

This assumes that the user has selected a range, so you might want to read my next post which handles identifying ranges.

Please note: I reserve the right to delete comments that are offensive or off-topic.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.