+ Reply to Thread
Results 1 to 3 of 3

how to multiple the rows by a given number

  1. #1
    Registered User
    Join Date
    06-09-2006
    Posts
    62

    how to multiple the rows by a given number

    Hi guys,

    I wonder if anyone can assist me on this one: say I have the word Apple on cell A1 and the number 60 on cell A2, question is how can I have the word apple multiply 60 times between A1 to A60?

    Is there such possibility? (Without dragging the cursor to A60)

    [I have 500 addresses and I need to multiply each by either 60 or 50)

    Thanks for any help

  2. #2
    RJ
    Guest

    RE: how to multiple the rows by a given number

    Well the only way I know to do this is through a loop in VBA. If the word you
    wanted repeated was in cell A1 and the number of times you wanted it repeated
    was in cell B1, then the following code when ran would paste the word in cell
    A1 down the number of times of cell B1.

    Sub mutliplerows()
    X = Cells(1, 2).Value
    i = 2
    Do Until i = X + 1
    Cells(i, 1).Value = Cells(1, 1).Value
    i = i + 1
    Loop
    End Sub

    "xianwinwin" wrote:

    >
    > Hi guys,
    >
    > I wonder if anyone can assist me on this one: say I have the word Apple
    > on cell A1 and the number 60 on cell A2, question is how can I have the
    > word apple multiply 60 times between A1 to A60?
    >
    > Is there such possibility? (Without dragging the cursor to A60)
    >
    > [I have 500 addresses and I need to multiply each by either 60 or 50)
    >
    > Thanks for any help
    >
    >
    > --
    > xianwinwin
    > ------------------------------------------------------------------------
    > xianwinwin's Profile: http://www.excelforum.com/member.php...o&userid=35264
    > View this thread: http://www.excelforum.com/showthread...hreadid=550353
    >
    >


  3. #3
    Registered User
    Join Date
    06-09-2006
    Posts
    62
    thanks, I got familiar with macros :-)

+ 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