+ Reply to Thread
Results 1 to 13 of 13

Placing triangle symbols WITHIN cell for significance testing

  1. #1
    Hari Prasadh
    Guest

    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. #2
    Dana DeLouis
    Guest

    Re: 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" <excel_hariNOSPAM@hotSPAREMEmail.com> wrote in message
    news:uI7UcquhFHA.4028@TK2MSFTNGP10.phx.gbl...
    > 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. #3
    Dana DeLouis
    Guest

    Re: 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" <delouis@bellsouth.net> wrote in message
    news:uy2GjuuhFHA.1416@TK2MSFTNGP09.phx.gbl...
    > 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" <excel_hariNOSPAM@hotSPAREMEmail.com> wrote in message
    > news:uI7UcquhFHA.4028@TK2MSFTNGP10.phx.gbl...
    >> 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. #4
    Dr. Stephan Kassanke
    Guest

    Re: Placing triangle symbols WITHIN cell for significance testing


    "Hari Prasadh" <excel_hariNOSPAM@hotSPAREMEmail.com> schrieb im Newsbeitrag
    news:uI7UcquhFHA.4028@TK2MSFTNGP10.phx.gbl...
    > 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. #5
    Hari Prasadh
    Guest

    Re: 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" <kassanke.news@gmx.de> wrote in message
    news:OCgou0uhFHA.1044@tk2msftngp13.phx.gbl...
    >
    > "Hari Prasadh" <excel_hariNOSPAM@hotSPAREMEmail.com> schrieb im
    > Newsbeitrag news:uI7UcquhFHA.4028@TK2MSFTNGP10.phx.gbl...
    >> 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. #6
    Hari Prasadh
    Guest

    Re: 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" <delouis@bellsouth.net> wrote in message
    news:%23jvSvyuhFHA.1248@TK2MSFTNGP12.phx.gbl...
    >>> 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" <delouis@bellsouth.net> wrote in message
    > news:uy2GjuuhFHA.1416@TK2MSFTNGP09.phx.gbl...
    >> 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" <excel_hariNOSPAM@hotSPAREMEmail.com> wrote in message
    >> news:uI7UcquhFHA.4028@TK2MSFTNGP10.phx.gbl...
    >>> 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. #7
    Dr. Stephan Kassanke
    Guest

    Re: Placing triangle symbols WITHIN cell for significance testing

    Hi Hari,

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

    cheers,
    Stephan

    "Hari Prasadh" <excel_hariNOSPAM@hotSPAREMEmail.com> schrieb im Newsbeitrag
    news:OJRr4YwhFHA.2644@TK2MSFTNGP09.phx.gbl...
    > 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. #8
    Dr. Stephan Kassanke
    Guest

    Re: 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" <excel_hariNOSPAM@hotSPAREMEmail.com> schrieb im Newsbeitrag
    news:OJRr4YwhFHA.2644@TK2MSFTNGP09.phx.gbl...
    > 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" <kassanke.news@gmx.de> wrote in message
    > news:OCgou0uhFHA.1044@tk2msftngp13.phx.gbl...
    >>
    >> "Hari Prasadh" <excel_hariNOSPAM@hotSPAREMEmail.com> schrieb im
    >> Newsbeitrag news:uI7UcquhFHA.4028@TK2MSFTNGP10.phx.gbl...
    >>> 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. #9
    Hari Prasadh
    Guest

    Re: 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" <kassanke.news@gmx.de> wrote in message
    news:db0vt0$3r2$1@news.uni-paderborn.de...
    > 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. #10
    Dr. Stephan Kassanke
    Guest

    Re: Placing triangle symbols WITHIN cell for significance testing


    "Hari Prasadh" <excel_hariNOSPAM@hotSPAREMEmail.com> schrieb im Newsbeitrag
    news:uGuDNywhFHA.576@TK2MSFTNGP15.phx.gbl...
    > 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. #11
    Tushar Mehta
    Guest

    Re: 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 <OJRr4YwhFHA.2644@TK2MSFTNGP09.phx.gbl>,
    excel_hariNOSPAM@hotSPAREMEmail.com 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" <kassanke.news@gmx.de> wrote in message
    > news:OCgou0uhFHA.1044@tk2msftngp13.phx.gbl...
    > >
    > > "Hari Prasadh" <excel_hariNOSPAM@hotSPAREMEmail.com> schrieb im
    > > Newsbeitrag news:uI7UcquhFHA.4028@TK2MSFTNGP10.phx.gbl...
    > >> 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. #12
    Hari Prasadh
    Guest

    Re: Placing triangle symbols WITHIN cell for significance testing

    Hi Tushar,

    Thanks for the code and explanations.

    Regards,
    Hari
    India

    "Tushar Mehta" <tmUnderscore200310@tushar-mehta.SeeOhEm> wrote in message
    news:MPG.1d4030418368ad698b0c5@msnews.microsoft.com...
    > 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 <OJRr4YwhFHA.2644@TK2MSFTNGP09.phx.gbl>,
    > excel_hariNOSPAM@hotSPAREMEmail.com 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" <kassanke.news@gmx.de> wrote in message
    >> news:OCgou0uhFHA.1044@tk2msftngp13.phx.gbl...
    >> >
    >> > "Hari Prasadh" <excel_hariNOSPAM@hotSPAREMEmail.com> schrieb im
    >> > Newsbeitrag news:uI7UcquhFHA.4028@TK2MSFTNGP10.phx.gbl...
    >> >> 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. #13
    Tushar Mehta
    Guest

    Re: 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 <OrTgUgJiFHA.1416@TK2MSFTNGP09.phx.gbl>,
    excel_hariNOSPAM@hotSPAREMEmail.com says...
    > Hi Tushar,
    >
    > Thanks for the code and explanations.
    >
    > Regards,
    > Hari
    > India
    >

    {snip}

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1