Solved

Apply Bold to cell contents on certain condition

Posted on 2013-02-07
3
227 Views
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

Conditional-bold.xlsx
0
Comment
Question by:AndreasHermle
3 Comments
 
LVL 49

Accepted Solution

by:
Rgonzo1971 earned 250 total points
ID: 38863565
Hi,

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
Next

End Sub

Open in new window


Regards
0
 
LVL 24

Assisted Solution

by:Steve
Steve earned 250 total points
ID: 38863576
Or apply conditional formatting:

Highlight column E
Conditional formatting > Based upon formula
Formula:
=$D1=""
Format to be bold.
Accept.

This will do it without macro code.
0
 

Author Closing Comment

by:AndreasHermle
ID: 38864614
Dear both,

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

I really appreciate it.

Regards, Andreas
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now