Question:
A couple of Excel questions?
Lioness
2008-01-16 03:57:08 UTC
1- Is there any way I can add explanatory text to a numerical value in a cell without affecting the formula?

2- How do I prevent Excel from showing fractions (ex. 2/17) as dates? I tried typing an apostrophe before the number but still didn't work.

I know I need to take an Excel course but thanks for the free lessons for now :)
Six answers:
2008-01-16 04:02:49 UTC
1) Only way is to right-click -> Insert Comment



2) Use single-quote ( ' )before the number and it should work. Or right-click -> Format Cells -> Number -> General



I suggest you don't do macro without two aspirins beside you. ^_^
Spartacus!
2008-01-16 08:24:36 UTC
You may want to review this free Excel tutorial online. If deals with more than just these questions, but should be helpful in giving you a better understanding of how excel works and how to perform many specific tasks in Excel. (Formatting doesn't come in until page 27.)



http://www.learnthat.com/computers/learn-420-free_microsoft_excel_tutorial.htm
delaw
2008-01-16 04:10:17 UTC
1.Go to the insert function on the upper toolbar and click on 'comment. You can type in all the explanations you want



2.Right click on the cells and pick 'format cells'.A dialogue box will come up. On the number tab,click on text. This enables you to type in any function whichever way you want.



Try it and get back to me in case you have any other issues
2008-01-16 04:03:30 UTC
1. Insert a comment

2. Format the cell for fractions (up to three digits)
NeedToKnow!
2008-01-16 04:10:42 UTC
Right click on the cell:

- Add comment

- Format cell - select Text for no formatting
Asif K
2008-01-16 04:02:40 UTC
it's a tipycal way... but u'll try this

Macro Tool Bar Syntax

Macro Tool Bar (MTB) has a variety of commands that can be used to automate drawing and code generation activities in Vector Cam. The application is a single .exe file that can be placed within the Vector installation directory, and then called from the File-Execute menu item in Vector CAD. MTB may also be installed in a unique directory, and multiple copies within separate directories will allow multiple instances of the toolbar to be visible at the same time. Commands can be sent to Vector Cad, Vector Cam, and Notepad. Each specific program must be opened prior to issuing commands for the specific program.



The toolbar appears as a single button on the desktop, and maintains a primary visibility status, appearing to float on top of the Vector windows. Right clicking the button opens the credits and exit dialog, left clicking the button drops down the buttons.



Left Clicking a button causes the preprogrammed commands to be executed. Pointing at a button with the mouse cursor opens a tool tips description to help remind the user which function has been programmed. Right Clicking opens the script text editor for the clicked button. The button text, a tool tips text, as well as the desired scripting commands may be entered. The script may be tested and debugged by clicking the Run Macro button. Cancel exits the editor without saving any changes. OK saves all changes and exits the editor. The commands, command strings, comments, etc are color coded within the editor for easy readability.



Refer to the Vector user forum for detailed explanation of the workings of the Macro Tool Bar, including many tips, and detailed step by step instructions.



Command Syntax:



Sendkey Vector "command string"



Where "Command String" consists or a series of characters and symbolic codes that simulate the keyboard characters that can be entered to cause actions in Vector. This includes Vector hot keys and most keyboard letter, numeric, and symbol key combinations. The commands themselves may be either upper or lower case letters.



or



Line X1 , Y1 , Z1 , X2 , Y2 , Z2



Where the X-Y-Z values indicate the coordinate values that are to be used to draw a line.



Commands:



Most commands have a long and shorthand form. Both are listed for a given command.



Send commands to Vector CAD:



Sendkey Vector "command string"

SV "command string"



Send commands to Vector CAM:



Sendkey Vector_NC "command string"

SVNC "command string"



Send commands to Notepad:



Sendkey Notepad "command string"

SN "command string"



"Command String"



Consists of a combination of control characters, text strings, and variables which simulate the exact key presses to simulate for input to to the SendKey commands.



Control and ALT Keys contained with in square braces [CTRL-A ]. Case sensitive and must be separated by commas.



Here is the listing of the keyword commands available.



[ALT-TAB]

[ALT-A] through [ALT-Z]

[CTRL-A] through [CTRL-Z]

[F1] through [F12]



Also:



[LF] [DEL] [END]

[CR] [UP] [EOT]

[ESC] [DOWN] [PGUP]

[TAB] [LEFT] [PGDN]

[BACK-TAB] [RIGHT] [QUOTE]

[SELECT] [HOME] [COMMA]



Comment lines begin with an apostrophe ' :



'This is a comment



Geometry drawing commands



All values in the geometry drawing commands may be numbers, numeric variables, valid numeric expressions for VectorCad numeric expression evaluation in number entry boxes, or any logical combination of these. These emulate the Vector coordinate drawing methods and make it easier to use those directly. The values can be mathematical expressions like 3-.5 , math functions like sin(90), and hybrid expressions like sin(90+[A]), where [A] is a numeric variable.



LINE X1,Y1,Z1,X2,Y2,Z2



LINE 1,2,0,2,4,5

LN 4,3,0,3,5,6





POINT X1,Y1,Z1



POINT 2,3,0

PT 5,0,0



Arc commands One draws a full circle and the second draws a partial (arc).



Full Circle Format, all fields are required:



ARC X1,Y1,Z1,Radius, CCW or CW



Example:

ARC 10 ,10 ,0 ,3.7545 , CCW



Partial Arc Format, again all field required:



ARC X1,Y1,Z1,Radius,CCW or CW, Start, End, RotX, RotY



Example:

ARC 0, 2 , 0 , 2.5 , CCW , 0 , 45 ,0 ,0



Delay in seconds

The seconds value can be a number or a numeric variable



SLEEP 5

SL 5



Repeat looping - Limit 1000

No nesting of Repeat command allowed.

Also no break key to stop looping - start with small loops to test. The repeat value can be a number or a numeric variable.



REPEAT 5

any commands to be repeated several times

END REPEAT





ASK prompt for numerical input

ASK "Message to display on prompt" , R

R is a numeric variable



Example usage



ASK "Number of Repeat Cycles" , R



REPEAT R

.

END REPEAT



ASK prompt for Text input and send it to Notepad.

ASK "What is your name?" , T4

SN "[T4]"



Message Box Prompt:



MSGBOX "Select Geometry"

MB "Select Geometry"



Numerical Variables

A - Z

All Variables are set to zero at the start of the macro



Display All Numerical Variables - Helpful when debugging

DV



Display Variable "A" Only

DV A



Clipboard Variables for numeric variables, text variables, and the ASK

command.



For numeric values:

SET A = CLIP

SET CLIP = A



Note: If the clipboard contains text, the numeric value will be zero.



For Text values:

SETTEXT T4 = CLIP

SETTEXT CLIP = T4



ASK "Change Clipboard Setting" , CLIP



Display contents of Clipboard

DS CLIP



Math functions Commands





Set Value to Variable

SET A , 1.234

SET B , A



or



SET A = 1.234

SET B = A





Add to Variable

ADD A , 3.4

ADD B , A





Subtract from Variable

SUBT A , 2

SUBT B , A





Multiply Variable by Value

MULT A , 3

MULT A , B





Divide Variable by Value

DIV A , 3

DIV A , B





Set Variable to an Absolute Number

ABS A





Set Variable to an Integer Number

INT A



The SET command can also include math formulas with variables.

This enables the user to access the Vector math functions through the MTB.

Added the equal sign "=" to the syntax. The comma sign is still works for

exsisting macros.



The math formula must be inside parentheses ( ) .

Variables must be inside brackets [ ] on math formulas.



SET A = 3

SET B = 4

SET C = ( SQRT ( ( [A] * *2 ) + ( [B] * *2 ) ) )



Or



SET A , 3

SET B , 4

SET C, ( SQRT ( ( [A] ** 2 ) + ( [B] ** 2 ) ) )



For more math functions, see the Vector Help Index under "Calculator".





' Using Variables:

ASK "How many Circles do you what to draw?" , C

SET X , 5

SET Y , 5

SET Z ,1

SET R ,1

REPEAT C

ARC [X] , [Y] , [Z] , [R] , CCW

ADD Z, .5

END REPEAT





Text Variables

T0 - T9

All Text Variables are reset at the start of the macro



Display Text Variables

DS



Display Text Variable "T3" Only

DS T3



Set Text Variable

SETTEXT T2 , "Text Information"

ST T2 , "Text Information"





Using Text Variables



ASK "Enter Program Number" , T1

SVNC "[alt-m],[cr] , [T1] ,[cr],[alt-O],[RIGHT],g,[alt-m],[DOWN],[DOWN],[CR]"



End Macro in the middle of text editor - Helpful for Debugging.

EM


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...