Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 54
  • Last Modified:

Bold cell contents if the cell contents starts with a number using VBA

Dear Experts:

for the selected cells in a column (contiguous range) I would like to perform the following VBA Action.

If the macro hits a cell (of this selected range) which starts with a number, the macro is to bold the cell contents.

The cell contents are alphanumeric characters formatted as standard.

Help is much appreciated. Thank you very much in advance.

Regards, Andreas
0
Andreas Hermle
Asked:
Andreas Hermle
1 Solution
 
Rgonzo1971Commented:
Hi,

pls try
Sub macro()

For Each c In Selection
    If c Like "[0-9]*" Then
        c.Font.Bold = True
    End If
Next
End Sub

Open in new window

Regards
0
 
Andreas HermleTeam leaderAuthor Commented:
Hi Rgonzo,

as always great coding from your side.

thank you very much for your professional help. I really appreciate it.

Regards, Andreas
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now