The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Deleting the spaces in a column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

naeem498

17 Posts

Posted - 06/15/2011 :  04:57:44 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

naeem498

17 Posts

Posted - 06/15/2011 :  11:46:29 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 06/15/2011 :  2:33:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

patty2011

USA
1 Posts

Posted - 06/15/2011 :  9:24:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Whew! It was right timing that i open an account with Origin. My problem with spaces in column is now gone. Thanks,Hideo!
Go to Top of Page

naeem498

17 Posts

Posted - 06/16/2011 :  07:06:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hey Hideo,

Brilliant, that worked, thankyou very much

Regards
Go to Top of Page

Deehege

United Kingdom
1 Posts

Posted - 06/23/2011 :  5:40:45 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000