Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default checking cell format

if i have code that formats a cell:
Format(cell, "ddd" & Chr(10) & "mm/dd")


how would i test cells to find if the format is applied?

--


Gary



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default checking cell format

First, that code doesn't format a cell, it returns a string with the
desired format. If you then apply that string to a cell, it may or may
not be parsed correctly. To format the cell, you'd want:

cell.NumberFormat = "ddd" & Chr(10) & "mm/dd"

To test the cell, check the .NumberFormat property:

MsgBox cell.NumberFormat = "ddd" & Chr(10) & "mm/dd"

will display True/False in the message box.


In article ,
"Gary Keramidas" <GKeramidasATmsn.com wrote:

if i have code that formats a cell:
Format(cell, "ddd" & Chr(10) & "mm/dd")


how would i test cells to find if the format is applied?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default checking cell format

ok, thanks je

--


Gary


"JE McGimpsey" wrote in message
...
First, that code doesn't format a cell, it returns a string with the
desired format. If you then apply that string to a cell, it may or may
not be parsed correctly. To format the cell, you'd want:

cell.NumberFormat = "ddd" & Chr(10) & "mm/dd"

To test the cell, check the .NumberFormat property:

MsgBox cell.NumberFormat = "ddd" & Chr(10) & "mm/dd"

will display True/False in the message box.


In article ,
"Gary Keramidas" <GKeramidasATmsn.com wrote:

if i have code that formats a cell:
Format(cell, "ddd" & Chr(10) & "mm/dd")


how would i test cells to find if the format is applied?



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
Format Checking George Excel Discussion (Misc queries) 1 March 9th 09 04:16 PM
Checking a cell conditional format basilio Excel Worksheet Functions 7 November 29th 08 08:45 AM
Spell Checking with checking cell notes jfitzpat Excel Discussion (Misc queries) 0 August 8th 07 10:26 PM
Checking a Date format Kobus Excel Programming 1 April 12th 05 01:09 PM
checking the format of a string in a cell Corbin[_6_] Excel Programming 3 June 11th 04 01:27 PM


All times are GMT +1. The time now is 05:02 PM.

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"