LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 192
Default Using VBA to change a cell format to date doesn't get "committed"

Hi,

I have some cells with the following formatted dates loaded from XML, they
come in as text formatted "01AUG2008"

I used the following VBA to change the cell storage format - date
Selection.NumberFormatLocal = "[$-409]dd-mmm-yy;@"

Then I have a sumproduct formula that uses date ranges as one of it's
parameters. It doesn't pick up the cell data until I click in it and hit
enter once. Then it can be referenced. I took a macro of that action
"clicking and hit enter" but it looks to be setting a formula for each cell
specific to it's contents
ActiveCell.FormulaR1C1 = "18-Apr-2008"

What I want is the cell to be formatted as a date and without having to
click into it. Does anyone know how I can do this?

Thanks in advance,

Nick

 
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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Format cell to display "Y" or "N"when entering a 1 or zero Brad Excel Discussion (Misc queries) 7 February 8th 07 06:50 PM
"if" statment in excell cell that will change format in another Paul Excel Discussion (Misc queries) 2 August 2nd 06 11:47 AM
Formulae or format to change a number "1" into the word "one Excel Help Excel Discussion (Misc queries) 1 May 30th 06 04:25 PM


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