Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

Iterative text cleanup via calc or custom function...

Featured Replies

This is one of those things I know I could do if I could just find an example of something similar. In lieu of a more robust connection with another tool we use at work (which is ancient and not going to be updated), I'd like to create a quick method for pasting in some data from the old tool and cleaning it up and just showing the data we care about (via an auto-enter calculation step).

The data I can copy/paste is multiple lines of text, with the individual field data separated by tabs. I want to paste this into a text field and strip out all but two values per line (the positions of which I can always determine by counting the tabs.

So, each line would look like:

0001 {tab} X {tab} 111-1112 {tab} B {tab} FINISHED GOODS LABEL {tab} 03 - PROD RLSD {tab} 1.000 EA {tab} etc....

I only want to keep the 3rd & 5th values (for each line), and lose everything else. I could easily create a script to do this, but I want it to be elegant and want to learn how to do this via some kind of recursion in a calculation or custom function. Ideally, it would be smart enough to only affect lines that had multiple tabs in the first place (so I could paste a line like the one above at the bottom of other text that had already been formatted).

Any suggestions, or examples of something similar enough to get the lightbulb in my brain to click on?

Edited by Guest

Wouldn't it be easier to do this in a text editor such as TextWrangler?

Here's a sample of how this might work.

Tabbed.zip

  • Author

Works great, and was easily understood, except for the actual recursion part. Apparently I need to try to re-understand that last function line when I'm not so tired.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.