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?
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?
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.
Originally Posted by Steel Monkey
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.
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
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?
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.
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.
Here try this out, right click on the buttons select assin macro then edit, to see the macros
That works great.
Thanks.
How did you write it though?
I still can't figure it out.
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
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?
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
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?
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
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks