Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default how to get the format of this cell right?

When I let go:

Selection.Replace " ", Replacement:="-", Lookat:=xlPart, _
SearchOrder:=xlByColumns,
MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

" " is entered by means of an array:
Words = Array(" ", "+", "/", "---", "--", "&")

on a cell containing: 5 a
I would expect to get: 5-a as a result.

Unfortunately, it produces 5:00:00-AM. How can I solve this tiny but
frustrating problem?


best regards
Peter
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default how to get the format of this cell right?

Format the cell as TEXT before entering a value to that cell. HTH Otto

"ppeer" wrote in message
...
When I let go:

Selection.Replace " ", Replacement:="-", Lookat:=xlPart, _
SearchOrder:=xlByColumns,
MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

" " is entered by means of an array:
Words = Array(" ", "+", "/", "---", "--", "&")

on a cell containing: 5 a
I would expect to get: 5-a as a result.

Unfortunately, it produces 5:00:00-AM. How can I solve this tiny but
frustrating problem?


best regards
Peter


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
Lock Cell Format - Allow copy and paste of data without format change Chris12InKC Excel Worksheet Functions 2 May 9th 23 07:42 PM
cell format - remove cell format pattern without effecting colors Bas Excel Discussion (Misc queries) 1 March 23rd 09 02:54 PM
Can cell format come from and change with reference cell format jclouse Excel Discussion (Misc queries) 1 November 29th 06 03:20 AM
how do i format a cell based on format of a range of cells? Chris Hardick Excel Discussion (Misc queries) 2 April 3rd 06 08:54 AM
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


All times are GMT +1. The time now is 03:44 PM.

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"