Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8002413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:21:31+00:00 2026-06-04T16:21:31+00:00

I am trying to do some conditional formatting in Excel for the font size

  • 0

I am trying to do some conditional formatting in Excel for the font size but seeing as it can’t be done from the format menu, it needs to be done with VBA.

I have a range B6 to however many rows and I want to look at the cell next to it and see if it’s blank (column C). If it is then format the cell to Bold and 11pt. If it’s not blank then it needs to be normal and 9pt.

My code at the minute only makes the last row Bold and 11pt and the rest of the column, even if column C is empty will be normal 9pt.

What is going wrong? BTW I’m using Excel 2003

Dim c As Range, rng
Dim LASTROW As Long

LASTROW = Cells(Rows.Count, 1).End(xlUp).Row

Set rng = Range("B6:B" & LASTROW)
For Each c In rng
    If Len(c.Offset(1, 0)) = 0 Then
        c.Font.Bold = True
        c.Font.Size = 11
    Else
        c.Font.Bold = False
        c.Font.Size = 9
    End If
Next c
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T16:21:32+00:00Added an answer on June 4, 2026 at 4:21 pm

    Your Offset parameters are backwards. You are checking the cell below the current one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to do some conditional formatting in Excel 2003, what I want to
Using Excel 2010 and trying to work on some semi-complicated conditional formatting. The spreadsheet
I am trying to apply some conditional formatting on a WPF DataGrid.The requirement is
I'm trying to set some conditional statements for nested embedRelation() instances, and can't find
I was trying this from some time, but I am not able to get
In my ruby(1.9.3) on rails (3.1) app I'm trying to set some conditional behavior
I am trying some way to optimize following sql statement: exe_sql DELETE FROM tblEvent_type
I am trying to make a conditional colorization in Excel 2007. Let me explain
Ok, so I am using excel 2007, and am trying to do some fairly
I'm trying conditional formatting on a sheet. I need to fill the cells with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.