locked
How would would loop Copy and Paste as many times according to a numerical value within a cell of MS Excel? RRS feed

  • Question

  • Dear Forum members,

    I have run into difficulty while trying to automate a function within Excel for the company I am interning for. My current issue is how to repeat copy and paste as many times according to the cell value. In other words, how do I get to copy and paste seven times if the cell has a 7 in it, or five times if the cell contains a 5.

    I am fairly familiar with VBA Do Loops, another few operations in VBA. Although I am beginning with VBA, I do have some mastery over it.

    I thank you for your time.

    • Moved by Kee Poppy Friday, August 26, 2011 2:56 AM (From:Visual Basic General)
    Wednesday, August 24, 2011 5:40 PM

All replies

  • Copy and Paste what?
     
    In general it is poor practice to copy and paste in code. The clipboard belongs to the user and you shouldn't overwrite it. Although there are occasions when your options are limited, there is usually another, often better, way in code. So what is it you want to do?
     

    Enjoy,
    Tony
    www.WordArticles.com
    Friday, August 26, 2011 9:43 AM