Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default <= in the numeric format

In filling analytical and other results into tables, if a relation should be
expressed (i.e. 20 ppm = under the limit of detection), a vast majority of
people used to record directly this script. The format, however, accomodates
to a text one, which prevents the range from being taken into further
calculations or from changing the number of decimal places. The help is
principally simple, by adding the relation sign ahead of the bare numeric
format. This can be automatically accomplished by a very simple macro, as

Sub LessGreater()
'Sub adds a sign i.e. '<', before formatted content of the selected cell(s).
Dim Cell As Range
Static Chars As String
Chars = InputBox("<= < = etc.", "Add a sign before the number",
Chars)
For Each Cell In Selection
If IsNumeric(Cell) Then Cell.NumberFormat = Chars & Cell.NumberFormat
Next
End Sub

Unfortunately it seems that adding associated signs (Chr(163) and Chr(179))
from the Symbol font can be achieved neither programmatically nor manually
before Vista and UNICODE. Is it true?

Thanks for your conforming my opinion

--
Petr Bezucha
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default <= in the numeric format


The difficulty being setting the font of the custom format characters to
"Symbol", yes?
No I don't think it's possible.
A work round might be to add a line of the ilk:
Cell.Font.Name = "Symbol"
in the code, but you'd still need users to know how to enter these
characters - perhaps with a userform instead of the InputBox?


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=143742

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default <= in the numeric format


The difficulty being setting the font of the custom format characters to
"Symbol", yes?
No I don't think it's possible.
A work round might be to add a line of the ilk:
Cell.Font.Name = "Symbol"
in the code, but you'd still need users to know how to enter these
characters - perhaps with a userform instead of the InputBox?


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=143742

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default <= in the numeric format

p45cal

The change of format of the whole cell is elementary. Unfortunately Symbol
numerals look noticeably different from Arial or Times ones. It is a matter
of taste.
The record into InputBox would be no problem, too: the mnemonic <= or =
with the following conversion in the macro would do the job.
Lets wait for UNICODE that I still have no experience with.
Thank you for your voice.

--
Petr Bezucha


"p45cal" wrote:


The difficulty being setting the font of the custom format characters to
"Symbol", yes?
No I don't think it's possible.
A work round might be to add a line of the ilk:
Cell.Font.Name = "Symbol"
in the code, but you'd still need users to know how to enter these
characters - perhaps with a userform instead of the InputBox?


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=143742


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 .txt file contents to numeric format will not work - help! Tacrier Excel Discussion (Misc queries) 3 October 7th 08 10:00 PM
Converting values which are in Numeric format to word format Frnc Excel Discussion (Misc queries) 1 July 2nd 08 08:42 AM
Numeric Format Daniel Excel Programming 3 December 10th 07 04:13 PM
numeric format user Excel Programming 1 February 28th 07 10:27 PM
Change number (in text format) to numeric format Pam Excel Discussion (Misc queries) 5 October 24th 05 07:45 PM


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