Apply Bold to cell contents on certain condition

Posted on 2013-02-07
Medium Priority
Last Modified: 2013-02-07
Dear Experts:

I got thousand of entries in Column D.

A macro should now perform the following action:

As soon as the macro hits a blank cell in Column D, the cell that is located right next to it on the same row, i.e. on Column E,  should get the property bold .

Thank you very much in advance.

I have attached a sample file for your convenience.

Regards, Andreas

Question by:Andreas Hermle
LVL 54

Accepted Solution

Rgonzo1971 earned 1000 total points
ID: 38863565

Sub Bolding()

Set myRange = Range(Range("D1"), Range("D65000").End(xlUp))

For Each cell In myRange
    If cell.Text = "" Then
        cell.Offset(0, 1).Font.Bold = True
    End If

End Sub

Open in new window

LVL 24

Assisted Solution

Steve earned 1000 total points
ID: 38863576
Or apply conditional formatting:

Highlight column E
Conditional formatting > Based upon formula
Format to be bold.

This will do it without macro code.

Author Closing Comment

by:Andreas Hermle
ID: 38864614
Dear both,

great job from both of you. Thank you very much for your professional help.

I really appreciate it.

Regards, Andreas

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

587 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question