Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Finding the Format of a Cell

Have a large dynamically populated worksheet (from another application).
Some cells are date formats, currency, text, etc. I need allof the cells to
be formatted as text without losing their 'look and feel'. I can't use
=Cell("Format",A1) in VBA and can't find any equivalent. On dates I could
say the equivalent of -
If '=Cell("Format",A1)' = "D4" Then Format(Activecell.Value,"m/d/yy")

Any Ideas?
TIA-
--
Gus Evans
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 336
Default Finding the Format of a Cell

if you use a Variant variable (which I guess you must), you can use the
TypeName property (see VBA help)

"GusEvans" wrote:

Have a large dynamically populated worksheet (from another application).
Some cells are date formats, currency, text, etc. I need allof the cells to
be formatted as text without losing their 'look and feel'. I can't use
=Cell("Format",A1) in VBA and can't find any equivalent. On dates I could
say the equivalent of -
If '=Cell("Format",A1)' = "D4" Then Format(Activecell.Value,"m/d/yy")

Any Ideas?
TIA-
--
Gus Evans

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Finding the Format of a Cell

Thanks - worked like a charm.
--
Gus Evans


"Martin" wrote:

if you use a Variant variable (which I guess you must), you can use the
TypeName property (see VBA help)

"GusEvans" wrote:

Have a large dynamically populated worksheet (from another application).
Some cells are date formats, currency, text, etc. I need allof the cells to
be formatted as text without losing their 'look and feel'. I can't use
=Cell("Format",A1) in VBA and can't find any equivalent. On dates I could
say the equivalent of -
If '=Cell("Format",A1)' = "D4" Then Format(Activecell.Value,"m/d/yy")

Any Ideas?
TIA-
--
Gus Evans

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
cell format - remove cell format pattern without effecting colors Bas Excel Discussion (Misc queries) 1 March 23rd 09 02:54 PM
* causing problems with finding duplicates with conditional format Michele - DARCC Excel Discussion (Misc queries) 1 March 26th 08 02:49 PM
finding last non-blank cell and then copying it to the next cell mike_vr Excel Discussion (Misc queries) 0 January 17th 08 05:02 PM
How do I copy data in single cell format to a merged cell format Paul Excel Discussion (Misc queries) 1 June 27th 05 11:00 AM
Finding Cell Interior Colour of First Cell in Column ExcelMonkey[_190_] Excel Programming 4 March 22nd 05 03:01 AM


All times are GMT +1. The time now is 04:09 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"