• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Delete a line that includes a certain name

Guest
Jun 08, 2017 Jun 08, 2017

Copy link to clipboard

Copied

Hi,

I import a list of names everyday from excel into indesign and would like to whittle the list down of people who are no longer with the company. Is there find/change command I can set up to delete the whole line that a certain name appears on? In the example below, is there a way to delete Rob's entire line (rob's line shows up in multiple spots so that is why I would prefer something I can run everyday rather than deleting it manually)? Since they are coming in from excel, each line ends with a paragraph break and the values are separated by tabs. Thank you in advance for any help you can give. 

Joe     0     0     0

Tom     0     0     0

Rob     0     0     0

Ben     0     0     0   

Mary     0     0     0

Views

661

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Jun 09, 2017 Jun 09, 2017

Oh, okay...and I think we are going about this in too complicated a manner. If you want their entire line erased, try this (for John Doe and Erica Gamet's info):

^(John Doe|Erica Gamet).+\r

Change to: leave blank

That says to delete John Doe's or Erica Gamet's info at the beginning of a line.

Votes

Translate

Translate
Enthusiast ,
Jun 08, 2017 Jun 08, 2017

Copy link to clipboard

Copied

You could do a GREP expression. You have a series of non-breaking spaces and one spacebar space before each value. Try:

(Tom|Rob)~S{4} \d~S{4} \d~S{4} \d

And replace with nothing...you'll still have a hard return, though...which you could use the built-in multiple return to single return to clean that up.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 08, 2017 Jun 08, 2017

Copy link to clipboard

Copied

Above, I did it for Tom and Rob's line both...just put all the names in that first group, separated by a 'pipe' for it to grab the names you want to delete.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 08, 2017 Jun 08, 2017

Copy link to clipboard

Copied

Hi Erica,

Thank you so much for your quick response. I didn't realize Grep was the way to do it and that you would tailor your answer to my data. My data is actually a little different than my example. It's a first name and last separated by a space and then 10 more categories which are separated by tabs and have a different numerical value each day. For example:

John Doe(tab).000(tab).000(tab).000(tab)12(tab)3(tab)4(tab)54(tab)567(tab)0(tab)0(paragraph break)

Does that change the grep expression?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jun 08, 2017 Jun 08, 2017

Copy link to clipboard

Copied

Replace the spaces in the provided grep with the grep tab command. Copy and paste the grep into the grep find box, delete a space and use the flout to insert the tab string. Do it to the other spaces.

Why isn't the excel file cleaned up so thus is even needed? If because it is now laid out, I would recommend doing it for the future.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 08, 2017 Jun 08, 2017

Copy link to clipboard

Copied

^John Doe(\t[\d.]+){10}\r?

If you have a list [.txt] provided each day, as:

Erica Gamet

MW Design

Darth Vader

Duffy Duck

…

Do it in 1 click with a simple script [personally, not for free!]

(^/) 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 09, 2017 Jun 09, 2017

Copy link to clipboard

Copied

Oh, okay...and I think we are going about this in too complicated a manner. If you want their entire line erased, try this (for John Doe and Erica Gamet's info):

^(John Doe|Erica Gamet).+\r

Change to: leave blank

That says to delete John Doe's or Erica Gamet's info at the beginning of a line.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 09, 2017 Jun 09, 2017

Copy link to clipboard

Copied

I couldn't edit my comment...I left off a ? at the end of that line...that makes sure if the name is the last one, it will also find it. Oops!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 09, 2017 Jun 09, 2017

Copy link to clipboard

Copied

The power of Grep is its capacity given to users to define "patterns"! (Grep Jedi Bible)

Here, in French, we call that: "Taper en touche !" 

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 09, 2017 Jun 09, 2017

Copy link to clipboard

Copied

Thank you very much, everyone. I really appreciate the help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 09, 2017 Jun 09, 2017

Copy link to clipboard

Copied

If it's coming in via Excel why not do a Data Merge.

https://indesignsecrets.com/automating-data-handling.php

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jun 09, 2017 Jun 09, 2017

Copy link to clipboard

Copied

LATEST

looks liek you have 4 colums, ad a fith and add a number 1 next to the name you want to remove, do a sort and than delete all of the 1?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines