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
 All Forums
 Origin Forum
 Origin Forum
 Deleting the spaces in a column

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
naeem498 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
6   L A T E S T    R E P L I E S    (Newest First)
Deehege 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.
naeem498 Posted - 06/16/2011 : 07:06:17 AM
Hey Hideo,

Brilliant, that worked, thankyou very much

Regards
patty2011 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!
Hideo Fujii 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
naeem498 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 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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000