Jump to content

Strip Text From Worksheet


Recommended Posts

Searched the forum and couldn't find anything. I have a bunch of default instruments in spotlight that bring in some numerical data as text. ( 93lbs instead of 93). 

 

Rather than changing all of my records is there a way to strip out a string of text from a worksheet column? If I could remove 'lbs' and 'watts' and return only numerical data I would be in good shape.

 

Thanks!

Edited by stevenmorgan94
Link to comment
  • 2 weeks later...

Digging this one back up. 

 

I am trying to get the total weight of this column. I am able to strip away the 'lb' using Pat's formula above, however I can't total the column. 

 

I have tried:

=SUM(G4.1..G4.4) 

However I don't think you can select sub-rows using the range symbol.

 

Also tried:

=Value(Substring(G4, 'lb', 1))

Obviously it just returns the '4.00' which is the count of the column. I can't find a way to only apply that to sub-rows.

 

Any ideas?

Screen Shot 2018-11-21 at 11.52.09 AM.png

Link to comment

the 'Lighting Device'.'Weight' field is text not a number that is why it won't add up.

 

If you are OK with not being able to change the weight from the worksheet try using =Value(Substring('Lighting Device'.'Weight', ' ' ,1))  Note that there is a space between the single quotes after the field name.

 

If you want to be able to make changes from the worksheet you will have to use two columns.  Put the Record.Field into one cell and then reference that cell in the Substring call.

 

You can use the Format Cell Trailer to add the 'lb' back into the display if you want.

Link to comment
  • 2 years later...

Like all things, it depends.

 

If the data is coming from a record.field, then substring will not help.

 

If the data is just text then maybe, because you have to have some kind of a delimiting character.

 

Would a script to edit the data attached to the objects be a better option?

 

Tell me more about how you need your data fixed.  Maybe in a new thread.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...