Solved

Apply Bold to cell contents on certain condition

Posted on 2013-02-07
3
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 51

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
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…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

687 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