Author |
Topic |
|
naeem498
17 Posts |
Posted - 06/15/2011 : 04:57:44 AM
|
Hi, How can I delete the empty rows within a column.
42 -- -- 19 -- -- 20
I want the data as
42 19 20
if it goes into another column it doesnt matter
Thanks |
|
Hideo Fujii
USA
1582 Posts |
Posted - 06/15/2011 : 09:56:10 AM
|
Hi Naeem,
> How can I delete the empty rows within a column.
You can use Worksheet Query tool to extract the rows which satisfy the condition, then delete the original worksheet, if you want. To do so (Assume you have columns, A(X) and B(Y) that contains empty (a.k.a Missing Value) cells:
1) Choose "Worksheet: Worksheet Query" menu to start the tool. 2) Select the column B, and press "=>" button to make it usable as a variable for the condition. ("B" (case insensitive) becomes the variable.) 3) Put the following condition in the box: b!=(1/0) Here, "1/0" (one divided by zero) represents a missing value. 4) Click OK to run.
Hope this helps you.
--Hideo Fujii OriginLab |
Edited by - Hideo Fujii on 06/15/2011 09:58:02 AM |
|
|
naeem498
17 Posts |
Posted - 06/15/2011 : 11:46:29 AM
|
Hi Hideo,
It works perfectly fine when I take the data from any outside file (.txt). The problem is, I am taking the values inside the origin file from another column (for (int i=13; i<=20000; i=i+150, col(B)[i]$= col(D)[i]$). It seems originlab is not detecting that. I get result found = 0
Thanks for the help
Regards
Naeem |
|
|
Hideo Fujii
USA
1582 Posts |
Posted - 06/15/2011 : 2:33:42 PM
|
Hi Naeem,
Since your script used a string assignment, your "empty" cells are actually not handled as numeric. So, the empty cells appear to have the missing value as shown as --, but actually they must have literally a two-dash string, "--". (Why did you use the assignment "col(B)[i]$= col(D)[i]$" instead of "col(B)[i]= col(D)[i]" for numeric? Two easy remedies may be:
1) Change the format of column B from "Text&Numeric" to "Numeric" or 2) Change the condition in the Worksheet Query to a string comparison like: b$!="--"
Hope it works this time.
--Hideo Fujii OriginLab
|
Edited by - Hideo Fujii on 06/15/2011 3:38:17 PM |
|
|
patty2011
USA
1 Posts |
Posted - 06/15/2011 : 9:24:20 PM
|
Whew! It was right timing that i open an account with Origin. My problem with spaces in column is now gone. Thanks,Hideo! |
|
|
naeem498
17 Posts |
Posted - 06/16/2011 : 07:06:17 AM
|
Hey Hideo,
Brilliant, that worked, thankyou very much
Regards |
|
|
Deehege
United Kingdom
1 Posts |
Posted - 06/23/2011 : 5:40:45 PM
|
That was great advice, Hideo. It worked for me too. It took me ages to get it right though but got there in the end. |
|
|
|
Topic |
|