Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2014

    Question Unanswered: Copy and paste a cell into another cell according to its content


    I need help with this.

    I need to copy contents of a cell ( by rows) from one excel sheet to another. But the destination column of the cell will depend on the value of the cell being copied.

    Say the recipient sheet will have columns for products P1234EN, P1234ES, P1443EN, P1443FR etc and may be they are in columns H,I,J,K

    The donor sheet will have a number of rows , each row for one product along with quantity such that cell B1=P1234ES, B2=2 ( for quantity)
    I want to go down rows 1 to X until empty row is reached and look at value of B1 (which is P1234ES) move along to B2 and copy this number and paste it in the recipient sheets Column which matches B1. I will know in advance what the columns in the recipient sheet will be.

    Can this be done? is there a way to automate this?

    I have a similar VBA code which copies from one sheet to another row by row. But with that one I can specify in the code where each data will be copied to. Difference here is that where the data ends up is determined by the value of another cell.

    Thanks for any advice.


  2. #2
    Join Date
    Aug 2008
    It can be done but will require some scriptring. Check Powershell for this purpose, as you can control and read the cells

  3. #3
    Join Date
    Sep 2014

    Microsoft Excel ( Copy and paste a cell)

    Hi, Glad that I found this thread. Thanks for sharing your question and at the same time , I was able to have read a response about it. I really learned something again from this post. I only knew some basic of Microsoft Excel. I really appreciate this one.

  4. #4
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    yes you can do this using VBA.. you are part way there already with your current VBA procedure.

    A quick and dirty way of learning what to do is to turn ont he macro recorder , dow what you want the VBA to do, then turn off the macro recorder.
    look at the recorded macro and modify as required.

    its a lot easier and quicker than trying to learn the excel model form scratch or by reading the help files
    I'd rather be riding on the Tiger 800 or the Norton

Tags for this Thread

Posting Permissions

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