Hi all,
I have a variable name code which is in string type but the value is mixing. for example I have a solid number value which is 001, 002, 003... and that's all the value I want to. Unfortunately, there are also char value like 'abc', 'asd'..etc. So can u help me on how to get rid of all the unwanted value.
thanks
Turbo Integtrator checking
-
- Posts: 3
- Joined: Wed May 18, 2011 9:33 am
- OLAP Product: TM1, Excell
- Version: 9.5.2
- Excel Version: 2003
-
- Site Admin
- Posts: 1458
- Joined: Wed May 28, 2008 9:09 am
Re: Turbo Integrator checking
http://www.tm1forum.com/viewtopic.php?p=6037 covers this well.
-
- Posts: 3
- Joined: Wed May 18, 2011 9:33 am
- OLAP Product: TM1, Excell
- Version: 9.5.2
- Excel Version: 2003
Re: Turbo Integtrator checking
hey I have another problem I appreciate whoever could help. I have a variable to store let say 100 of data, so I want to put the data into the cube using cellputn, however, i also want to insert the data from that variable to another cell. which mean I want to insert data using same variable into the difference cell by certain condition..
thanks
thanks
-
- Site Admin
- Posts: 6667
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Turbo Integtrator checking
Use the If function to determine whether the condition is True or not.luiswiseman wrote:hey I have another problem I appreciate whoever could help. I have a variable to store let say 100 of data, so I want to put the data into the cube using cellputn, however, i also want to insert the data from that variable to another cell. which mean I want to insert data using same variable into the difference cell by certain condition..
If it is, use a second CellPutN inside the If/EndIf block to write the data to the second location. All you have to do is use different element arguments in the second function.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Posts: 3
- Joined: Wed May 18, 2011 9:33 am
- OLAP Product: TM1, Excell
- Version: 9.5.2
- Excel Version: 2003
Re: Turbo Integtrator checking
thanks for reply,
these are some of my variable value, (ElementA, 101,102,103,104,105, ElementB, 111, 122,123,124,126, ElementC, ....). What I'm going to do is I want to put the value from 101 till 105 into a particular cell and 111 till 126 into another cell. Logically, I can use the value 'ElementA' and 'ElementB' to separate them but how can I interpret them to if else statement.
these are some of my variable value, (ElementA, 101,102,103,104,105, ElementB, 111, 122,123,124,126, ElementC, ....). What I'm going to do is I want to put the value from 101 till 105 into a particular cell and 111 till 126 into another cell. Logically, I can use the value 'ElementA' and 'ElementB' to separate them but how can I interpret them to if else statement.
-
- Site Admin
- Posts: 6667
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Turbo Integtrator checking
I'm not sure that I follow you. Do you have these variables on a single record, so that each row contains ElementA, 101, 102, 103 (etc)? (Obviously 101, 102 etc must refer to the variable value, not the name, which might be something like V1, V2, V3 etc.)luiswiseman wrote:thanks for reply,
these are some of my variable value, (ElementA, 101,102,103,104,105, ElementB, 111, 122,123,124,126, ElementC, ....). What I'm going to do is I want to put the value from 101 till 105 into a particular cell and 111 till 126 into another cell. Logically, I can use the value 'ElementA' and 'ElementB' to separate them but how can I interpret them to if else statement.
If so you'd just add the variables together when doing the cellputn and use multiple statements.
CellPutN(V2+V3+V4+V5+V6, Elements that relate to ElementA);
CellPutN(V8+V9+V10+V11+V12, Elements that relate to ElementB);
and so on.
If these values are coming through in different rows, so that each row has (say)
ElementA, 101
ElementA,102
ElementA, 103
...
ElementB, 111
and so on,
you could use an If statement to work out the variables that the CellPutN is writing to but you'd also need to aggregate the values by doing a CellGetN to get the current value, then writing the sum of that back to the cell. For instance:
dbl_CurrentVal = CellGetN(The elements that correspond to ElementA, B or whatever relates to that row);
CellPutN (dbl_CurrentVal+V2, The elements that correspond to ElementA, B or whatever relates to that row);
In this way you'd ultimately add up the 101, 102 etc values.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.