Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Detecting Null

I want to detect whether part of the text in a cell is bolded,
underlined, or uses a special font. Rather than slow things down by
looking at each character, I thought I could just detect whether any
part of the text in the cell has one of these attributes since, if only
part of a cell is bold, for instance, the fontstyle for the whole cell
will be null. However, looking at a cell with only part of it bolded
and part of it underlined, I can't seem to detect this with something
like this:
with activecell.font
If IsNull(.Name) Or IsNull(.FontStyle) Or IsNull(.Underline) Or
IsNull(.Bold) Then DetectJ = True
end with

What am I doing wrong? Excel 2002. TIA, James

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Detecting Null

Seemed to work for me. At least it worked as I expected.

--
Regards,
Tom Ogilvy


"Zone" wrote in message
ups.com...
I want to detect whether part of the text in a cell is bolded,
underlined, or uses a special font. Rather than slow things down by
looking at each character, I thought I could just detect whether any
part of the text in the cell has one of these attributes since, if only
part of a cell is bold, for instance, the fontstyle for the whole cell
will be null. However, looking at a cell with only part of it bolded
and part of it underlined, I can't seem to detect this with something
like this:
with activecell.font
If IsNull(.Name) Or IsNull(.FontStyle) Or IsNull(.Underline) Or
IsNull(.Bold) Then DetectJ = True
end with

What am I doing wrong? Excel 2002. TIA, James



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Detecting Null

Thanks, Tom. Yes, it does work fine. I checked again and I didn't
have the cell address correct. I appreciate your answer. Forced me to
find the mistake. This way is much faster than looking at each
character. Regards, James

Tom Ogilvy wrote:
Seemed to work for me. At least it worked as I expected.

--
Regards,
Tom Ogilvy


"Zone" wrote in message
ups.com...
I want to detect whether part of the text in a cell is bolded,
underlined, or uses a special font. Rather than slow things down by
looking at each character, I thought I could just detect whether any
part of the text in the cell has one of these attributes since, if only
part of a cell is bold, for instance, the fontstyle for the whole cell
will be null. However, looking at a cell with only part of it bolded
and part of it underlined, I can't seem to detect this with something
like this:
with activecell.font
If IsNull(.Name) Or IsNull(.FontStyle) Or IsNull(.Underline) Or
IsNull(.Bold) Then DetectJ = True
end with

What am I doing wrong? Excel 2002. TIA, James


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
Failed to save table attributes of (null) into (null). Luca Brasi Excel Discussion (Misc queries) 2 February 4th 09 04:30 PM
COUNTIF says Null = Blank but Blank < Null Epinn Excel Worksheet Functions 4 October 25th 06 08:03 PM
Null, "null", vbNull, vbNullString, vbEmpty [email protected] Excel Programming 2 July 25th 06 01:28 PM
cell value based on null/not null in another cell spence Excel Worksheet Functions 1 February 18th 06 11:49 PM
Detecting VBA code Chris Gorham[_3_] Excel Programming 1 November 1st 03 08:34 PM


All times are GMT +1. The time now is 07:32 AM.

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

About Us

"It's about Microsoft Excel"