Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Font Information for a cell with multiple color and size

I have a range of cells J4:J404 that contain Strings of data. The default
font properties for this range a font.Name: "Arial", Font.Size: 10.

There are cells containing highlighted data. Example: Cell J10 contains
the string "Cell with non standard font". The word "non" is highlighted with
a font.name="Bookman" and a font.size=14.

How do I know that a cell contains such highlighted text and what is the
property of this text? Do I have to go through the content of the cell
character by character?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Font Information for a cell with multiple color and size


A cell with a mixed font size or mixed font will return null.
You can check for that to identify those cells.
'--
Sub WhatsThere()
Dim rCell As Range
Set rCell = ActiveCell
If IsNull(rCell.Font.Size) Then
MsgBox "Cell " & rCell.Address & " has more than one font size. "
End If
If IsNull(rCell.Font.Name) Then
MsgBox "Cell " & rCell.Address & " has multiple fonts. "
End If
End Sub
'--
If you want to know the details then you will have to interrogate
each character...
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel add-ins for sorting, comparing, counting and...)


"Pred"

wrote in message
I have a range of cells J4:J404 that contain Strings of data. The default
font properties for this range a font.Name: "Arial", Font.Size: 10.

There are cells containing highlighted data. Example: Cell J10 contains
the string "Cell with non standard font". The word "non" is highlighted with
a font.name="Bookman" and a font.size=14.

How do I know that a cell contains such highlighted text and what is the
property of this text? Do I have to go through the content of the cell
character by character?
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font style/size/color/etc for multiple series in a chart? Hossdaddy Charts and Charting in Excel 3 January 14th 10 07:36 PM
Save as dialogue box, changing font size/color Rick M Excel Discussion (Misc queries) 1 April 30th 09 08:12 PM
Changing Font color based on font type or size John Excel Discussion (Misc queries) 2 February 7th 08 12:50 AM
Default cell comment fill color and font size Shadowman13 Excel Discussion (Misc queries) 2 September 28th 05 08:16 PM
Can you keep a cells BOLD Font, cell color size Trese Excel Discussion (Misc queries) 2 August 23rd 05 03:09 PM


All times are GMT +1. The time now is 03:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"