+ Reply to Thread
Results 1 to 15 of 15

auto display of degree symbol?

  1. #1
    Registered User
    Join Date
    01-08-2006
    Posts
    41

    auto display of degree symbol?

    I've got a cell that displays a formula result from other cells.
    This output is an angle. How can I get Excel to automatically display the degree symbol after the number?

  2. #2
    Forum Contributor
    Join Date
    11-23-2005
    Location
    Perth, Australia
    Posts
    218

    auto display of degree symbol?

    Heres one way :
    Right click the cell go to format-select custom ahnd paste in the following,

    0.00°

    That will display two decimal points with the degree symbol after it.

    Let me know if this is what you need!
    Last edited by Steel Monkey; 08-24-2006 at 07:00 PM.

  3. #3
    Registered User
    Join Date
    01-08-2006
    Posts
    41
    Quote Originally Posted by Steel Monkey
    Heres one way :
    Let me know if this is what you need!

    Yup, that's what I needed. Thank you.

    You wouldn't happen to know how I can get text to appear automatically in the same cell before something is typed, would you?

    Basically, I've got a picture(diagram) of a triangle with "holes" in it so you can type in the cells denoting angles at the points.

    For example:
    The bottom-left point would say "angle a" before you typed in the numeric value. The same for the bottom-right point. I'm probably asking to much but, if I could get that same cell to revert to saying "angle a" after the equation is run, that would be awesome.

    I've attached part of the worksheet in question if that helps explain things.
    Attached Files Attached Files

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480
    In the same custom box you should be able to use

    0.00° "Angle A"

    I can think of having the cell reset to just Angle A with a macro, check out this thread for an idea

    http://www.excelforum.com/showthread.php?t=573417

  5. #5
    Registered User
    Join Date
    01-08-2006
    Posts
    41
    That thread has me completely lost.
    i've never dealt with macros and code other than putting formulas into cells.

    How does this code work and where would it go?

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480
    Here is an example

    delete Angle A and select another cell

    Angle A Appears in the cell

    to see the code rightclick on sheet1 tab and select view codes, if the code doesn't show hit the down arrow and select worksheet the code should show then, in the selection change, this could also be placed in the worksheet change event
    Last edited by davesexcel; 08-26-2006 at 12:01 PM.

  7. #7
    Registered User
    Join Date
    01-08-2006
    Posts
    41
    That 0.00° "Angle A" thing didn't work for me.

    It kept showing both the numeric value and the words Angle A.

    I'm completely lost as to how I would get that macro to work.
    In the file attached to this post I've got comments explaining what I want to do.

    Thanks for the help.
    Attached Files Attached Files

  8. #8
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480
    Here try this out, right click on the buttons select assin macro then edit, to see the macros
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-08-2006
    Posts
    41
    That works great.

    Thanks.

    How did you write it though?
    I still can't figure it out.

  10. #10
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480
    use your macro recorder.
    Click on the macro recorder and give it a one word name
    select the ranges you want to clear by clicking on the first cell, then with the Ctrl button pressed select the other cells you want cleared
    hit the delete button then select a cell where you want to end up
    turn off the macro recorder

    next right click on the shape and select -assign macro
    select the macro you just recorded
    there you go

  11. #11
    Registered User
    Join Date
    01-08-2006
    Posts
    41
    I didn't think it was that easy.
    I thought I needed to know VBA or something.

    Is there some way I can clear the contents of all but cell K25?

  12. #12
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480
    rightclick on the shape that has the clear macro
    select assign macro
    edit
    look for the place that has
    Range("K16,K25,H30,N30,K34").Select
    delete the range you want
    Range("K16,H30,N30,K34").Select

  13. #13
    Registered User
    Join Date
    01-08-2006
    Posts
    41
    I tried your suggestion.
    It clears only cell K25. The other cell are unchanged.

    I tried this also:


    Range("K16,H30,N30,K34").Select
    Range("K16,H30,N30,K34").Activate
    Selection.ClearContents
    Range("D15").Select






    It doesn't work.
    Did I do something wrong?

  14. #14
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480
    ActiveSheet.Unprotect

    '
    Range("K16,H30,N30,K34").Select
    Selection.ClearContents
    Range("D15").Select
    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    should look like this

    here's some tips on recording macros

    http://www.taltech.com/support/sw_tricks/exmacros.htm
    http://www.developerfusion.co.uk/show/35/2/
    http://spreadsheets.about.com/gi/dyn...ngXLMacro.html

    that should be enough to get you started

  15. #15
    Registered User
    Join Date
    01-08-2006
    Posts
    41
    Thanks for the links.
    That last code you gave me still clears all the cells.

    I guess I'll just live with it like it is till I learn more about macros.

    Thank you for all your help.

+ 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