Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default Placing triangle symbols WITHIN cell for significance testing

Hi,

I want to insert symbols (Arial font) 25BC, 25B2, 25C4 and 25BA from Unicode
(hex) -- Their descriptions are Black down-pointing triangle/up-pointing
triangle/left-pointing and right pointing triangle.

I tried code(1) to code(255) but none of them yielded the triangles I
require. I want to do this using a programmatic approach.

Is it possible and if yes, please guide me.

Thanks a lot,
Hari
India

PS: - I would be running some formulas for comparing cells across 2 columns
(Z-test) and based on the result (True or false) would like to place one of
these symbols in the third column of the same row. then using R Bovey's
chart labeler show the significances in my charts.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Placing triangle symbols WITHIN cell for significance testing

Hi. Do Insert | Symbol | symbols tab.
Select "Arial" from the Font box (Upper left)
Select "Unicode" in From box (Lower Right)
Enter your Hex code in the "character code" box.

HTH :)
--
Dana DeLouis
Win XP & Office 2003


"Hari Prasadh" wrote in message
...
Hi,

I want to insert symbols (Arial font) 25BC, 25B2, 25C4 and 25BA from
Unicode (hex) -- Their descriptions are Black down-pointing
triangle/up-pointing triangle/left-pointing and right pointing triangle.

I tried code(1) to code(255) but none of them yielded the triangles I
require. I want to do this using a programmatic approach.

Is it possible and if yes, please guide me.

Thanks a lot,
Hari
India

PS: - I would be running some formulas for comparing cells across 2
columns (Z-test) and based on the result (True or false) would like to
place one of these symbols in the third column of the same row. then using
R Bovey's chart labeler show the significances in my charts.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Placing triangle symbols WITHIN cell for significance testing

I want to do this using a programmatic approach.

Oops. I missed the "programming" part. A recorded macro didn't help. I'm
not sure just yet.
--
Dana DeLouis
Win XP & Office 2003


"Dana DeLouis" wrote in message
...
Hi. Do Insert | Symbol | symbols tab.
Select "Arial" from the Font box (Upper left)
Select "Unicode" in From box (Lower Right)
Enter your Hex code in the "character code" box.

HTH :)
--
Dana DeLouis
Win XP & Office 2003


"Hari Prasadh" wrote in message
...
Hi,

I want to insert symbols (Arial font) 25BC, 25B2, 25C4 and 25BA from
Unicode (hex) -- Their descriptions are Black down-pointing
triangle/up-pointing triangle/left-pointing and right pointing triangle.

I tried code(1) to code(255) but none of them yielded the triangles I
require. I want to do this using a programmatic approach.

Is it possible and if yes, please guide me.

Thanks a lot,
Hari
India

PS: - I would be running some formulas for comparing cells across 2
columns (Z-test) and based on the result (True or false) would like to
place one of these symbols in the third column of the same row. then
using R Bovey's chart labeler show the significances in my charts.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Placing triangle symbols WITHIN cell for significance testing


"Hari Prasadh" schrieb im Newsbeitrag
...
Hi,

I want to insert symbols (Arial font) 25BC, 25B2, 25C4 and 25BA from
Unicode (hex) -- Their descriptions are Black down-pointing
triangle/up-pointing triangle/left-pointing and right pointing triangle.

I tried code(1) to code(255) but none of them yielded the triangles I
require. I want to do this using a programmatic approach.

Is it possible and if yes, please guide me.

Thanks a lot,
Hari
India

PS: - I would be running some formulas for comparing cells across 2
columns (Z-test) and based on the result (True or false) would like to
place one of these symbols in the third column of the same row. then using
R Bovey's chart labeler show the significances in my charts.


You are trying to insert unicode symbols which are not included in ASCII
code, thus chr() will fail. Try the ChrW function which will yield unicode
strings. Convert your hex values to decimals and try

range("a1")= chrw(9660) will result in the triangle downwards in cell A1.

The "regular" worksheet function is, at least in my Excel 2003 version, not
unicode enabled, and will only accept values 1 to 255. IMHO your way to go:
a loop in VBA checking your conditions for each cell and inserting the
appropriate symbol via the chrw function.

cheers
Stephan


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default Placing triangle symbols WITHIN cell for significance testing

Hi Stephen,

Thanx a lot for the help.

The following chrw codes in VBA worked great for me.

? 9650
? 9658
? 9660
? 9668


I was just wondering. The help file for "Insert a symbol" in excel XP says
within --Unicode options- "If you know the character code for a Unicode
character, you do not need to open the Symbol dialog box. Type the Unicode
hexadecimal character code in the document, and then press ALT+X. "

In the above why are they referring to a document as in "Type unicode....in
the document"? Shouldnt they say excel sheet?

I went to an excel sheet and typed 25BC and pressed Alt +X , but nothing
happened? Am I supposed to type this somewhere else. (I also tried with an
equal sign -- = 25BC -- but to no avail)

The "regular" worksheet function is, at least in my Excel 2003 version,
not unicode enabled, and will only accept values 1 to 255. IMHO your way
to go:

In my excel EVEN 1 to 255 gives a name error. I thought that may be charw is
not available as a function within workbook environment and may be available
in VBA only. But you say that 1 to 255 is working fine in worksheet, so i
guess I am wrong.

Regards,
Hari
India

"Dr. Stephan Kassanke" wrote in message
...

"Hari Prasadh" schrieb im
Newsbeitrag ...
Hi,

I want to insert symbols (Arial font) 25BC, 25B2, 25C4 and 25BA from
Unicode (hex) -- Their descriptions are Black down-pointing
triangle/up-pointing triangle/left-pointing and right pointing triangle.

I tried code(1) to code(255) but none of them yielded the triangles I
require. I want to do this using a programmatic approach.

Is it possible and if yes, please guide me.

Thanks a lot,
Hari
India

PS: - I would be running some formulas for comparing cells across 2
columns (Z-test) and based on the result (True or false) would like to
place one of these symbols in the third column of the same row. then
using R Bovey's chart labeler show the significances in my charts.


You are trying to insert unicode symbols which are not included in ASCII
code, thus chr() will fail. Try the ChrW function which will yield unicode
strings. Convert your hex values to decimals and try

range("a1")= chrw(9660) will result in the triangle downwards in cell A1.

The "regular" worksheet function is, at least in my Excel 2003 version,
not unicode enabled, and will only accept values 1 to 255. IMHO your way
to go: a loop in VBA checking your conditions for each cell and inserting
the appropriate symbol via the chrw function.

cheers
Stephan





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default Placing triangle symbols WITHIN cell for significance testing

Hi Dana,

Thanks for the time you took to respond.

I also tried a recorded macro but got some irrelevant stuff (posted in a
somewhat related thread "Shooting a Bullet character in Excel cell.")

Thanks a lot,
Hari
India

"Dana DeLouis" wrote in message
...
I want to do this using a programmatic approach.


Oops. I missed the "programming" part. A recorded macro didn't help.
I'm not sure just yet.
--
Dana DeLouis
Win XP & Office 2003


"Dana DeLouis" wrote in message
...
Hi. Do Insert | Symbol | symbols tab.
Select "Arial" from the Font box (Upper left)
Select "Unicode" in From box (Lower Right)
Enter your Hex code in the "character code" box.

HTH :)
--
Dana DeLouis
Win XP & Office 2003


"Hari Prasadh" wrote in message
...
Hi,

I want to insert symbols (Arial font) 25BC, 25B2, 25C4 and 25BA from
Unicode (hex) -- Their descriptions are Black down-pointing
triangle/up-pointing triangle/left-pointing and right pointing triangle.

I tried code(1) to code(255) but none of them yielded the triangles I
require. I want to do this using a programmatic approach.

Is it possible and if yes, please guide me.

Thanks a lot,
Hari
India

PS: - I would be running some formulas for comparing cells across 2
columns (Z-test) and based on the result (True or false) would like to
place one of these symbols in the third column of the same row. then
using R Bovey's chart labeler show the significances in my charts.







  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Placing triangle symbols WITHIN cell for significance testing

Hi Hari,

a lot of questions ;-) I try to answer them below.

cheers,
Stephan

"Hari Prasadh" schrieb im Newsbeitrag
...
Hi Stephen,

Thanx a lot for the help.


you are welcome.

The following chrw codes in VBA worked great for me.

? 9650
? 9658
? 9660
? 9668


I was just wondering. The help file for "Insert a symbol" in excel XP says
within --Unicode options- "If you know the character code for a Unicode
character, you do not need to open the Symbol dialog box. Type the Unicode
hexadecimal character code in the document, and then press ALT+X. "


I know there is a way of inserting characters if you know the numeral
ASCII/ANSI code. Press ALT and type the numeral code on the numeral block
(right part of your keyboard), e.g. ALT+065 yields "A". I was unaware that
this is possible with Unicode as well. i have a notebook with no numeral
block here, so I cannot test this. But i do not think it makes sense to
first type the code and press Alt+X in a second step, i think X symbolizes
the code of the character. Just try pressing Alt+unicode numeral code (hex
and decimal) on the number block, maybe it works.

In the above why are they referring to a document as in "Type
unicode....in the document"? Shouldnt they say excel sheet?


The help file is probably written in a generic manner, "documents" covers
worksheets as well.

I went to an excel sheet and typed 25BC and pressed Alt +X , but nothing
happened? Am I supposed to type this somewhere else. (I also tried with an
equal sign -- = 25BC -- but to no avail)


see above


The "regular" worksheet function is, at least in my Excel 2003 version,
not unicode enabled, and will only accept values 1 to 255. IMHO your way
to go:

In my excel EVEN 1 to 255 gives a name error. I thought that may be charw
is not available as a function within workbook environment and may be
available in VBA only. But you say that 1 to 255 is working fine in
worksheet, so i guess I am wrong.


I have a german version here. The VBA function Chr is called Zeichen() as a
worksheet function. Probably the name is char. try inserting a function via
Insert/function and then select the Text functions to restrict the number of
available text functions. ach function has a short description in the
dialog, so you will find the appropriate function. My guess is char, e.g.
=Char(65) yields A.

Regards,
Hari
India



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Placing triangle symbols WITHIN cell for significance testing

Hi Hari,

I was wrong on the input method:

http://www.linguistics.ucsb.edu/facu...ts/Unicode.htm

states:
Inserting Unicode characters is a bit more complex. The following is copied
from the Unicode FAQ:


--------------------------------------------------------------------------------

Q. How can I input any Unicode character if I know its hexadecimal code?

A. Some platforms have methods of hexadecimal entry; others have only
decimal entry.

On Windows, there is a decimal input method: hold down the alt key while
typing decimal digits on the numeric keypad. The ALT+decimal method requires
the code from the encoding of the command prompt. To enter Unicode decimal
values, you have to prefix the number with a 0 (zero). E.g. ALT+0163 is the
pound sign ("£"), in decimal.

There is a hex-to-Unicode entry method that works with WordPad 2000,
Office 2000 edit boxes, RichEdit controls in general, and in Microsoft Word
2002. To use it, type a character's hexadecimal code (in ASCII), making
corrections if needed, and then type Alt+x after it. The hexadecimal code is
replaced by the corresponding Unicode character. The Alt+x can be a toggle
(as in the Microsoft Office XP). That is, type it once to convert the hex
code to a character and type it again to convert the character back to a hex
code. If the hex code is preceded by one or more hexadecimal digits, you
will need to "select" the code so that the preceding hexadecimal characters
aren't included in the code. The code can range up to the value 0x10FFFF
(which is the highest character in the 17 planes of Unicode).



"Hari Prasadh" schrieb im Newsbeitrag
...
Hi Stephen,

Thanx a lot for the help.

The following chrw codes in VBA worked great for me.

? 9650
? 9658
? 9660
? 9668


I was just wondering. The help file for "Insert a symbol" in excel XP says
within --Unicode options- "If you know the character code for a Unicode
character, you do not need to open the Symbol dialog box. Type the Unicode
hexadecimal character code in the document, and then press ALT+X. "

In the above why are they referring to a document as in "Type
unicode....in the document"? Shouldnt they say excel sheet?

I went to an excel sheet and typed 25BC and pressed Alt +X , but nothing
happened? Am I supposed to type this somewhere else. (I also tried with an
equal sign -- = 25BC -- but to no avail)

The "regular" worksheet function is, at least in my Excel 2003 version,
not unicode enabled, and will only accept values 1 to 255. IMHO your way
to go:

In my excel EVEN 1 to 255 gives a name error. I thought that may be charw
is not available as a function within workbook environment and may be
available in VBA only. But you say that 1 to 255 is working fine in
worksheet, so i guess I am wrong.

Regards,
Hari
India

"Dr. Stephan Kassanke" wrote in message
...

"Hari Prasadh" schrieb im
Newsbeitrag ...
Hi,

I want to insert symbols (Arial font) 25BC, 25B2, 25C4 and 25BA from
Unicode (hex) -- Their descriptions are Black down-pointing
triangle/up-pointing triangle/left-pointing and right pointing triangle.

I tried code(1) to code(255) but none of them yielded the triangles I
require. I want to do this using a programmatic approach.

Is it possible and if yes, please guide me.

Thanks a lot,
Hari
India

PS: - I would be running some formulas for comparing cells across 2
columns (Z-test) and based on the result (True or false) would like to
place one of these symbols in the third column of the same row. then
using R Bovey's chart labeler show the significances in my charts.


You are trying to insert unicode symbols which are not included in ASCII
code, thus chr() will fail. Try the ChrW function which will yield
unicode strings. Convert your hex values to decimals and try

range("a1")= chrw(9660) will result in the triangle downwards in cell A1.

The "regular" worksheet function is, at least in my Excel 2003 version,
not unicode enabled, and will only accept values 1 to 255. IMHO your way
to go: a loop in VBA checking your conditions for each cell and inserting
the appropriate symbol via the chrw function.

cheers
Stephan





  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default Placing triangle symbols WITHIN cell for significance testing

Hi Stephen,

Thnx a TON for your detailed notes on all my doubts.

Very much appreciated.

(For my programming use chrw would come very very handy).

Thanks a lot,
Hari
India

"Dr. Stephan Kassanke" wrote in message
...
Hi Hari,

I was wrong on the input method:

http://www.linguistics.ucsb.edu/facu...ts/Unicode.htm

states:
Inserting Unicode characters is a bit more complex. The following is
copied from the Unicode FAQ:










cheers
Stephan







  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Placing triangle symbols WITHIN cell for significance testing


"Hari Prasadh" schrieb im Newsbeitrag
...
Hi Stephen,

Thnx a TON for your detailed notes on all my doubts.

Very much appreciated.

(For my programming use chrw would come very very handy).

Thanks a lot,
Hari
India

you are always welcome,
Stephan




  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Placing triangle symbols WITHIN cell for significance testing

To toggle between unicode characters and hex using ALT+x, use
Sub setAltX()
Application.OnKey "%x", "toggleUnicode"
End Sub
Sub resetAltX()
Application.OnKey "%x"
End Sub
Sub toggleUnicode()
If Len(ActiveCell.Value) 1 Then
ActiveCell.Value = ChrW("&H" & ActiveCell.Value)
Else
ActiveCell.Value = Hex(AscW(ActiveCell.Value))
End If
End Sub

Run the first to enable the toggle capability. Then, select any cell
with a hex code in it and use ALT+x. Finally, to disable the toggle,
run the 2nd subroutine. Do keep in mind that XL will not run a macro
while in edit mode. That might reduce the value of the above
capability.

To toggle between unicode and decimal, use
Sub toggleUnicodeDec()
If Application.WorksheetFunction.IsNumber(ActiveCell. Value) Then
ActiveCell.Value = ChrW(ActiveCell.Value)
Else
ActiveCell.Value = AscW(ActiveCell.Value)
End If
End Sub

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Hi Stephen,

Thanx a lot for the help.

The following chrw codes in VBA worked great for me.

? 9650
? 9658
? 9660
? 9668


I was just wondering. The help file for "Insert a symbol" in excel XP says
within --Unicode options- "If you know the character code for a Unicode
character, you do not need to open the Symbol dialog box. Type the Unicode
hexadecimal character code in the document, and then press ALT+X. "

In the above why are they referring to a document as in "Type unicode....in
the document"? Shouldnt they say excel sheet?

I went to an excel sheet and typed 25BC and pressed Alt +X , but nothing
happened? Am I supposed to type this somewhere else. (I also tried with an
equal sign -- = 25BC -- but to no avail)

The "regular" worksheet function is, at least in my Excel 2003 version,
not unicode enabled, and will only accept values 1 to 255. IMHO your way
to go:

In my excel EVEN 1 to 255 gives a name error. I thought that may be charw is
not available as a function within workbook environment and may be available
in VBA only. But you say that 1 to 255 is working fine in worksheet, so i
guess I am wrong.

Regards,
Hari
India

"Dr. Stephan Kassanke" wrote in message
...

"Hari Prasadh" schrieb im
Newsbeitrag ...
Hi,

I want to insert symbols (Arial font) 25BC, 25B2, 25C4 and 25BA from
Unicode (hex) -- Their descriptions are Black down-pointing
triangle/up-pointing triangle/left-pointing and right pointing triangle.

I tried code(1) to code(255) but none of them yielded the triangles I
require. I want to do this using a programmatic approach.

Is it possible and if yes, please guide me.

Thanks a lot,
Hari
India

PS: - I would be running some formulas for comparing cells across 2
columns (Z-test) and based on the result (True or false) would like to
place one of these symbols in the third column of the same row. then
using R Bovey's chart labeler show the significances in my charts.


You are trying to insert unicode symbols which are not included in ASCII
code, thus chr() will fail. Try the ChrW function which will yield unicode
strings. Convert your hex values to decimals and try

range("a1")= chrw(9660) will result in the triangle downwards in cell A1.

The "regular" worksheet function is, at least in my Excel 2003 version,
not unicode enabled, and will only accept values 1 to 255. IMHO your way
to go: a loop in VBA checking your conditions for each cell and inserting
the appropriate symbol via the chrw function.

cheers
Stephan




  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default Placing triangle symbols WITHIN cell for significance testing

Hi Tushar,

Thanks for the code and explanations.

Regards,
Hari
India

"Tushar Mehta" wrote in message
m...
To toggle between unicode characters and hex using ALT+x, use
Sub setAltX()
Application.OnKey "%x", "toggleUnicode"
End Sub
Sub resetAltX()
Application.OnKey "%x"
End Sub
Sub toggleUnicode()
If Len(ActiveCell.Value) 1 Then
ActiveCell.Value = ChrW("&H" & ActiveCell.Value)
Else
ActiveCell.Value = Hex(AscW(ActiveCell.Value))
End If
End Sub

Run the first to enable the toggle capability. Then, select any cell
with a hex code in it and use ALT+x. Finally, to disable the toggle,
run the 2nd subroutine. Do keep in mind that XL will not run a macro
while in edit mode. That might reduce the value of the above
capability.

To toggle between unicode and decimal, use
Sub toggleUnicodeDec()
If Application.WorksheetFunction.IsNumber(ActiveCell. Value) Then
ActiveCell.Value = ChrW(ActiveCell.Value)
Else
ActiveCell.Value = AscW(ActiveCell.Value)
End If
End Sub

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Hi Stephen,

Thanx a lot for the help.

The following chrw codes in VBA worked great for me.

? 9650
? 9658
? 9660
? 9668


I was just wondering. The help file for "Insert a symbol" in excel XP
says
within --Unicode options- "If you know the character code for a Unicode
character, you do not need to open the Symbol dialog box. Type the
Unicode
hexadecimal character code in the document, and then press ALT+X. "

In the above why are they referring to a document as in "Type
unicode....in
the document"? Shouldnt they say excel sheet?

I went to an excel sheet and typed 25BC and pressed Alt +X , but nothing
happened? Am I supposed to type this somewhere else. (I also tried with
an
equal sign -- = 25BC -- but to no avail)

The "regular" worksheet function is, at least in my Excel 2003 version,
not unicode enabled, and will only accept values 1 to 255. IMHO your
way
to go:

In my excel EVEN 1 to 255 gives a name error. I thought that may be charw
is
not available as a function within workbook environment and may be
available
in VBA only. But you say that 1 to 255 is working fine in worksheet, so i
guess I am wrong.

Regards,
Hari
India

"Dr. Stephan Kassanke" wrote in message
...

"Hari Prasadh" schrieb im
Newsbeitrag ...
Hi,

I want to insert symbols (Arial font) 25BC, 25B2, 25C4 and 25BA from
Unicode (hex) -- Their descriptions are Black down-pointing
triangle/up-pointing triangle/left-pointing and right pointing
triangle.

I tried code(1) to code(255) but none of them yielded the triangles I
require. I want to do this using a programmatic approach.

Is it possible and if yes, please guide me.

Thanks a lot,
Hari
India

PS: - I would be running some formulas for comparing cells across 2
columns (Z-test) and based on the result (True or false) would like to
place one of these symbols in the third column of the same row. then
using R Bovey's chart labeler show the significances in my charts.


You are trying to insert unicode symbols which are not included in
ASCII
code, thus chr() will fail. Try the ChrW function which will yield
unicode
strings. Convert your hex values to decimals and try

range("a1")= chrw(9660) will result in the triangle downwards in cell
A1.

The "regular" worksheet function is, at least in my Excel 2003 version,
not unicode enabled, and will only accept values 1 to 255. IMHO your
way
to go: a loop in VBA checking your conditions for each cell and
inserting
the appropriate symbol via the chrw function.

cheers
Stephan






  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Placing triangle symbols WITHIN cell for significance testing

You are welcome. Glad to be of help.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Hi Tushar,

Thanks for the code and explanations.

Regards,
Hari
India

{snip}
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
removing green triangle in cell Shooter Excel Worksheet Functions 4 May 7th 23 11:45 AM
Green Triangle in Cell M. B. Collins Excel Discussion (Misc queries) 4 August 8th 06 01:46 AM
Showing Significance Testing in Bubble Charts SteveChap Charts and Charting in Excel 1 June 13th 06 02:09 PM
What is the warning triangle in a cell and how do I get rid of it. confused Excel Discussion (Misc queries) 1 October 28th 05 10:26 PM
green triangle in date cell alexanderd[_6_] Excel Programming 1 May 17th 04 11:34 AM


All times are GMT +1. The time now is 06:44 AM.

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"