Solved

Apply Bold to cell contents on certain condition

Posted on 2013-02-07
3
216 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 48

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

744 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

12 Experts available now in Live!

Get 1:1 Help Now