+ Reply to Thread
Results 1 to 9 of 9

Copy lines of text cells, to another area, based on color of text.

  1. #1
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Copy lines of text cells, to another area, based on color of text.

    Hello experts!
    I have a long worksheet with lines of "text" going down column C (C200 down to C1300)
    What I would like to do is have any lines of text in the color "Red", "copy down" into another section
    in the worksheet. (in column CC1320 down to CC1360)

    Can this be done with a formula?
    (Excel 2003)
    (the amount of text lines in red may vary from just a few lines to maybe 40 lines)

    Thanks in advance for any help!

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Copy lines of text cells, to another area, based on color of text.

    If the formatting was applied using conditional formatting you could write a formula based on the logic of the conditional formatting to extract the data.

    If the formatting was manually applied then the only way to do this is using VBA code.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Copy lines of text cells, to another area, based on color of text.

    Well, I do run VBA for other items, (check & x boxes, etc.)
    Its a bit long and I'm sure I cant modify it myself.
    The text lines are "typed in" so can this be done with a formula?
    If not, I'm sure someone could help me modify my VBA.

    Thanks

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Copy lines of text cells, to another area, based on color of text.

    You need to extract some data based on the color of the text being red.

    WHY is the text red? Is there some piece of the data that meets a condition that it gets colored red?

    If there is some logical reason why the text is red we can probably come up with a formula to extract the desired data.

    Another option is to use another column and mark those rows with an "X" (or whatever) then write the formula to look for rows marked with "X".

  5. #5
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Copy lines of text cells, to another area, based on color of text.

    Well, I could "code" the text I want to pull down, with several things.
    The text line could start with a ~ or > or whatever. (I though color may work the easiest).
    I'm just trying to automatically pull "some" of the long list of text lines, down to "summary section".

  6. #6
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Copy lines of text cells, to another area, based on color of text.

    Yes. I could have a cell, just left of the text that I could put an X in (when I want that line
    copied in the summary section).
    How would that work?

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Copy lines of text cells, to another area, based on color of text.

    Like this...

    Data Range
    A
    B
    C
    D
    1
    2
    X
    Ben Dover
    Ben Dover
    3
    Robin Banks
    Anne Teak
    4
    Joe King
    Kerry Oki
    5
    X
    Anne Teak
    Justin Thyme
    6
    X
    Kerry Oki
    Misty Rain
    7
    Kris Kringle
    8
    Dinah Mite
    9
    X
    Justin Thyme
    10
    Mighty Mouse
    11
    X
    Misty Rain
    12
    ------
    ------
    ------
    ------


    This array formula** entered in D2:

    =LOOKUP("zzzzz",CHOOSE({1,2},"",INDEX(B:B,SMALL(IF(A$2:A$11="X",ROW(A$2:A$11)),ROWS(D$2:D2)))))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down until you get blanks.

  8. #8
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Copy lines of text cells, to another area, based on color of text.

    Yes, I see how it works, but I cant seem to "past down" (formulas that work) below and get the lower lines to work.
    Can you send me a worksheet with it done?

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Copy lines of text cells, to another area, based on color of text.

    Here's a small sample file created in Excel 2002 that demonstrates this.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Copy Cell info in a Sheet, to another area, based what the text line starts with?
    By richard11153 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-08-2016, 05:16 PM
  2. [SOLVED] Change text color of selected cells based on a text value of another cell
    By JNEWBURY2280 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-09-2014, 11:26 PM
  3. Copy and Paste Based on Text Color
    By sharp4 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2012, 02:49 PM
  4. Vlookup to copy the color of text in cells
    By gummi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-23-2008, 07:21 AM
  5. text box insert in Excel - text box lines print on second copy
    By Diana (Berry & Co) in forum Excel General
    Replies: 0
    Last Post: 07-25-2006, 11:40 PM
  6. change text color based on adjacent cell text color
    By matthewst in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-01-2005, 03:49 PM
  7. Changing row tex color based on text during copy
    By mdpx2005 in forum Excel General
    Replies: 1
    Last Post: 01-28-2005, 01:43 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1