+ Reply to Thread
Results 1 to 7 of 7

Copy cell to specific locations based on certain conditions

  1. #1
    Forum Contributor
    Join Date
    06-29-2012
    Location
    Calgary CA
    MS-Off Ver
    Excel 2010
    Posts
    117

    Copy cell to specific locations based on certain conditions

    Hi Gurus:

    So I am trying to copy cell to specific locations based on certain conditions(see attachment for illustation).
    I am wondering if anyone can write me a code for this task.


    Many many thanks,

    Chris

  2. #2
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Copy cell to specific locations based on certain conditions

    You know the drill. :-)

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-29-2012
    Location
    Calgary CA
    MS-Off Ver
    Excel 2010
    Posts
    117

    Re: Copy cell to specific locations based on certain conditions

    Works Great! I appreciate it Steven!!
    Enjoy the weekend!

    Chris

  4. #4
    Forum Contributor
    Join Date
    06-29-2012
    Location
    Calgary CA
    MS-Off Ver
    Excel 2010
    Posts
    117

    Re: Copy cell to specific locations based on certain conditions

    Hi Steve:


    So I am trying to the following(similer to this solved one but it inclueds 2 sheets) but I cannot post new thread since yesterday.
    Please take a look of the sample file for better illustration.

    -Compare the value of Cell B2 in sheet1 with all of the values of column D in sheet2.
    -If a match is found at row i, do following:
    --add ";" in front of the content of cell Ei and Fi respectively, if any,then copy them to cell C2 in sheet1.
    --add ";" in front of the content of cell Qi and Ri respectively, if any, then copy them to cell Ui in sheet1.
    --copy cell Ji from sheet2 to cell O2 of sheet1,if any.
    --copy cell Ki from sheet2 to cell L2 of sheet1 ,if any.
    --copy cell Li from sheet2 to cell M2 of sheet1, if any.
    --copy cell Ni from sheet2 to cell N2 of sheet1, if any.
    --copy cell Oi from sheet2 to cell D2 of sheet1, if any.
    -Repeat the above precedure for cell B3,B4,B5.......of sheet 1 until all of the cell in column B is compared.


    Many Many Thanks,
    Chris

  5. #5
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Copy cell to specific locations based on certain conditions

    Backup your data.
    Double check my code.

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    06-29-2012
    Location
    Calgary CA
    MS-Off Ver
    Excel 2010
    Posts
    117

    Re: Copy cell to specific locations based on certain conditions

    100% accurate code! works great!

    I really really appreciate it Steven!

    Chris

    P.S. It seems that chess and programming are closely tied lol

  7. #7
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Copy cell to specific locations based on certain conditions

    They are indeed!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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