[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Apply Bold to cell contents on certain condition

Posted on 2013-02-07
3
Medium Priority
?
260 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 54

Accepted Solution

by:
Rgonzo1971 earned 1000 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 1000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

829 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