SBS - The Best Value in QMS software

Minitab Macro-Command 'NUMERIC' to convert a text column to an numeric column

M

Makiaveli

#1
Hi,

does anybody know, how I use the command 'NUMERIC' in order
to convert a text column to an numeric column? The Problem is, that my decimal seperator is ",".

When I type 'NUMERIC C1 C2' in my session window the output is as I want it but when I use it in a macro the output is as below:

C1-T ---> C2 (after Macro) ---> C2 (session window)
17,81 _________*______________________17,81
18____________18_____________________ 18

So how can I adjust the NUMERIC-Command, that the "," will be taken as the decimal seperator in the macro?
NOTE: It's not possible just to change the regional settings, because other programms can not handle it.

Hope you can help me.
Thanx
 
Elsmar Forum Sponsor
M

Makiaveli

#2
Has no one an idea? :(
Does anyone know how I replace all "," in a Text Column with an ".", so that for example 17,81 will be 17.81? That would solve my problem too.

Thx
 

Miner

Forum Moderator
Staff member
Admin
#3
Has no one an idea? :(
Does anyone know how I replace all "," in a Text Column with an ".", so that for example 17,81 will be 17.81? That would solve my problem too.

Thx
There are only one or two covers with detailed experience in Minitab macros. It may take a while to get a response as they do not not check in daily.
 

sparky58

Involved In Discussions
#4
Has no one an idea? :(
Does anyone know how I replace all "," in a Text Column with an ".", so that for example 17,81 will be 17.81? That would solve my problem too.

Thx
You could use the search and replace to change , to . (Looks like binoculars in the tool bar)

Otherwise use "manip" > "change data type" >

this can appear a little hit and miss until you get used to it. Often it's easier to paste into excel, change things then re-paste back into minitab.
 

Tim Folkerts

Super Moderator
#5
Look in

Tools > Options > Individual Commands > Open > Text Files
Decimal Separator


You can select comma, period, or regional default.
 
A

Allattar

#6
If your decimal seperator is , but your regional settings so your seperator is .
Then it will open the data as text rather than numeric.

If you open the worksheet as indicated you can use options to change the decimal seperator on opening.

If you expect to be using , as the decimal seperator, like most European countries, then you can always check your regional settings to see what they are on your computer. These settings can always cause headaches if something isnt as expected.

Otherwise the easy options are to do the find and replace, the binoculars or in editor and replace as mentioned above and then change data type.
 
M

Makiaveli

#7
firts of all thx for your replies! :agree1:
Off course I can use the search and replace function manually each time but I want to use it as a macro for many datas and and I think such a funcion doesn't exist as a macro-command.

Unfortunately the change in the options to "," as decimal seperator does'nt work. It seems that the the macro-comand (not the session-comand) "NUMERIC" definetly want "." as a decimal seperator no matter whether you change the settings in Minitab to "," as decimal seperator.

For the moment I change my regional setting to "." as decimal seperator each time I use my macro.

As I said the problem occures only when I use NUMERIC in a macro. When using NUMERIC in the session-window, the comand looks up what my regional settings are and acts as I want.
 
A

Allattar

#8
Have you tried this as an Exec not a macro.

Execs are basically much simpler macro's without the headers, this may get round that problem.
 
M

Makiaveli

#9
Have you tried this as an Exec not a macro.

Execs are basically much simpler macro's without the headers, this may get round that problem.
That's right, a exec would work. However I read that Execs will be abolished in next versions.

I think the easiest way for me is to change the regional settings every time.
 
Thread starter Similar threads Forum Replies Date
V Minitab GRR crossed Xbar and r method macro needed Using Minitab Software 9
D minitab macro to pull access query with parameters Using Minitab Software 1
V Validation of macro - scripts - programs used in statistical software (Minitab-SAS... Qualification and Validation (including 21 CFR Part 11) 5
F Run Minitab Macro from Excel Using Minitab Software 3
M Minitab macro to add reference line to graph Using Minitab Software 1
M Writing a Minitab macro that can manipulate data in all columns Using Minitab Software 3
M Insert Empty Column Using Minitab Macro Using Minitab Software 2
B Minitab R14 macro for Power Analysis Using Minitab Software 1
T Minitab - Getting a Minitab Macro to look up a Column Name Using Minitab Software 23
M Minitab 15 - READ, SET from keyboard or file doesn't work in my macro Using Minitab Software 4
J RANCOVA (rank ANCOVA) macro for minitab Using Minitab Software 2
M Problem creating a Macro in Minitab Using Minitab Software 4
M Macro to connect to Access Database to get to data - Minitab Macro help Using Minitab Software 1
M Minitab macro vs. Layout tool Using Minitab Software 9
M Macro that will perform a normality test and capability analysis - Minitab help Using Minitab Software 1
A One-factor and multiple-response Minitab optimization Using Minitab Software 0
O Problem in Minitab - ERROR * Factor Voltage is highly correlated with other terms Using Minitab Software 10
F Minitab 19 Anova or X bar # of distinct catagories Using Minitab Software 2
P Pooled Standard Error - Minitab Statistical Analysis Tools, Techniques and SPC 0
S Asterisk in DOE minitab software Using Minitab Software 23
B Does anybody know how to get older versions of Minitab to work in Windows 10? Quality Tools, Improvement and Analysis 9
M Minitab Capability of the Population (no sampling) Using Minitab Software 11
Z Minitab - Updating Graph with specific data points Using Minitab Software 2
S Need help with analysing a survey on minitab Using Minitab Software 1
M Minitab assistant: 1-Sample % Defective Test Using Minitab Software 1
0 Interesting Discussion Analysis of half normal distribution in minitab Using Minitab Software 11
G Batch printing reports in Minitab Using Minitab Software 3
B Minitab Type 1 Gage Study on True Position Question Measurement Uncertainty (MU) 1
I Number of decimals in equation calculated by MiniTab Using Minitab Software 0
A Acceptance p-value for linearity and bias analysis in minitab results Gage R&R (GR&R) and MSA (Measurement Systems Analysis) 0
M How to change the display of optimization plot in Minitab 18 Using Minitab Software 2
M Minitab tool to evaluate PM (Preventive Maintenance) process Using Minitab Software 6
E Input to ANOVA 1-WAY - How can I perform this analysis in minitab? Using Minitab Software 2
N Tolerance Interval plots in Minitab Statistical Analysis Tools, Techniques and SPC 0
J Including Repeats in DoE using Minitab Using Minitab Software 5
A Minitab 18: How to automate GRR Summary Table save Reliability Analysis - Predictions, Testing and Standards 1
N What subcommands can be used with "Stop" in Minitab 18? Using Minitab Software 8
S Minitab - Factor Analysis: Label on second series of data for Biplot Using Minitab Software 4
J Which Anova dropdown to use for R&R in Minitab? Gage R&R (GR&R) and MSA (Measurement Systems Analysis) 1
J DoE - Number of runs in Plackett-Burman (Minitab) Using Minitab Software 2
D Asterix when pasting a column of values from Excel into Minitab (V17) Using Minitab Software 5
A Generating samples from a population in Minitab Using Minitab Software 0
Ron Rompen Random data generation in Minitab Statistical Analysis Tools, Techniques and SPC 2
I DOE: High variance and small effects in Minitab Using Minitab Software 1
B Informational Expanded Gage R&R Analysis using Minitab Gage R&R (GR&R) and MSA (Measurement Systems Analysis) 18
R Rank Deficiency Error Minitab Using Minitab Software 7
H Minitab 15 - Factorial Design - 3 factors: 4x3x2 - How to? Using Minitab Software 4
A Capability Analysis for Packaging Seal Strength with spec. >0.1 Kgf using Minitab Using Minitab Software 6
Coury Ferguson MiniTab 17 Question-Standard Deviation Default Capability, Accuracy and Stability - Processes, Machines, etc. 5
N Regression Model (Minitab 18) - Which values my input parameters should have Using Minitab Software 2

Similar threads

Top Bottom