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

How can I add a letter prefix to all cells in a column?

New Here ,
May 26, 2017 May 26, 2017

Copy link to clipboard

Copied

I have pages of existing InDesign (CS4) tables, filled with part numbers. We now need to add a single, constant letter prefix to each part number in a column. For example, right now a part number might be 220731 but I need to make it L220731. I need to do this for all items in the column, and I would like to be able to do it automatically. I already tried highlighting the column, and doing a replace based upon "replace *" with L* and that did not work.

Any thoughts?

Views

623

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

Community Expert , May 26, 2017 May 26, 2017

Using your example of the "L" prefix...

  1. Select the column
  2. Launch the Find/Change dialog and choose the GREP tab
  3. Find what: ^.+?
  4. Change to: L$0
  5. Search: Selection
  6. Click Change All

Votes

Translate

Translate
Community Expert ,
May 26, 2017 May 26, 2017

Copy link to clipboard

Copied

Using your example of the "L" prefix...

  1. Select the column
  2. Launch the Find/Change dialog and choose the GREP tab
  3. Find what: ^.+?
  4. Change to: L$0
  5. Search: Selection
  6. Click Change All

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
New Here ,
May 26, 2017 May 26, 2017

Copy link to clipboard

Copied

LATEST

Thanks so much John, this does exactly what I want. Saves me a lot of time.

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
Adobe Employee ,
May 26, 2017 May 26, 2017

Copy link to clipboard

Copied

Hi,

What do you mean by part numbers?

I am not so good with grep, but trying this simple query helped me achieve what i could make out from your question.

I selected the portion of the table and then ran the grep ONLY on the selection.

This is what I get then by hitting on "Change All"..

Just to add, since it is not clear how the numbers are or what part numbers mean it is not clear what is the desired result.

Running John's grep gives me somewhat different result than mine since it even converts words other than numbers to Lwords.

-Aman

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