+ Reply to Thread
Results 1 to 12 of 12

copy contents of one column to another column BUT change just a few words

  1. #1
    Forum Contributor
    Join Date
    03-20-2013
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    474

    copy contents of one column to another column BUT change just a few words

    hello,

    in column A, I have:
    red
    blue
    green
    black
    white
    yellow

    i would like column B to copy these, however, "blue" and "black" should be changed to the word "dark"
    whilst "white" and "yellow" is changed to "bright"

    red and green should be as they are.

    so column B will be:
    red
    dark
    green
    dark
    bright
    bright


    thank you

  2. #2
    Registered User
    Join Date
    09-11-2013
    Location
    Swindon, England
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: copy contents of one column to another column BUT change just a few words

    try this fella

    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(C4,"Black","Dark"),"Blue","Dark"),"Yellow","Bright"),"White","Bright")

  3. #3
    Forum Contributor
    Join Date
    03-20-2013
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    474

    Re: copy contents of one column to another column BUT change just a few words

    thanks.

    i'll be using this for 18 different colours.
    is it possible to write the formula in a way to simplify it and make it a lot shorter.
    so for example to list "black","blue","brown","navy","purple" but only mention "dark" once rather than "black","dark"),"blue","dark"),"brown","dark").........

  4. #4
    Registered User
    Join Date
    09-11-2013
    Location
    Swindon, England
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: copy contents of one column to another column BUT change just a few words

    I can write something, but you could always do find and replace?

  5. #5
    Forum Contributor
    Join Date
    03-20-2013
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    474

    Re: copy contents of one column to another column BUT change just a few words

    i cant replace because i need the initial column as it is for another calculation.
    plus the data set is continually growing so i would prefer a formula that forever does the job rather than having to find and replace in the future everytime new data is added.

    please write it out for me
    thanks

  6. #6
    Registered User
    Join Date
    09-11-2013
    Location
    Swindon, England
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: copy contents of one column to another column BUT change just a few words

    I would say the best way to do this if its often is make a table elsewhere on the sheet listing
    cells like
    red
    yellow
    blue
    black
    etc

    then next to them in col B what you want them to be for example: bright, dark

    Then in your main sheet do a vlookup along the lines of
    =vlookup(a1,$A$1:B$10,2,0)

    Cheers

  7. #7
    Registered User
    Join Date
    09-11-2013
    Location
    Swindon, England
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: copy contents of one column to another column BUT change just a few words

    untitled.JPG


    like this

  8. #8
    Forum Contributor
    Join Date
    03-20-2013
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    474

    Re: copy contents of one column to another column BUT change just a few words

    but column A is not necessarily as simple looking like that.

    you might have to go hundred of rows down to come across a colour for the first time.
    is it not just possible for a formula similar to your first one, but a bit shorter and simple.

    if not, then i can make do with the initial formula.
    thanks

  9. #9
    Registered User
    Join Date
    09-11-2013
    Location
    Swindon, England
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: copy contents of one column to another column BUT change just a few words

    How many colours do you have?
    Can you get a screen shot for me? That would help loads?

    Be good if we could get this sorted for you

  10. #10
    Forum Contributor
    Join Date
    03-20-2013
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    474

    Re: copy contents of one column to another column BUT change just a few words

    there are 50 colours in total in the column.
    18 need to have their words changed.
    9 colours changed to "dark"
    9 colours changed to "light"

    thats is.

    sorry, i cant give you a screenshot.
    the data im working with is not about colours - its highly sensitive data.

    thank you for your assistance.

  11. #11
    Registered User
    Join Date
    09-11-2013
    Location
    Swindon, England
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: copy contents of one column to another column BUT change just a few words

    Yeah its a tough one as the data is vast,
    I would say the Substitute formula is the way forward.
    If i come up with anything else i will let you know

  12. #12
    Forum Contributor
    Join Date
    03-20-2013
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    474

    Re: copy contents of one column to another column BUT change just a few words

    cheers mate.
    appreciate it

+ 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. [SOLVED] Copy and Paste in column b if column a has contents
    By redkilner in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2013, 02:30 PM
  2. [SOLVED] Copy Data in column B to other columns dependent on Contents of column A
    By timbo1957 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-07-2013, 05:54 AM
  3. Replies: 4
    Last Post: 03-21-2012, 08:58 AM
  4. VBA - Insert row, copy contents of original row except for contents of column A
    By Royzer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-20-2012, 07:41 PM
  5. Replies: 3
    Last Post: 02-25-2006, 02:00 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