Vba code to copy values down in the same column

  • I need to copy numbers from 1 to 100 in the same column repeating each number 5 times before moving to the next number .
    like


    1
    1
    1
    1
    1
    2
    2
    2
    2
    2
    till 100


    Please help

  • Re: Vba code to copy values down in the same column


    Code
    Public Sub test()
        
    [a1:a500].Formula = "=ROUNDUP(ROW()/5,0)"
    
    
    End Sub

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

  • Re: Vba code to copy values down in the same column


    Arm, as you can see, duplicate threads gets very confusing :)


    See your other thread also....


    nice solution Ger Plante

  • Re: Vba code to copy values down in the same column


    Thanks Jproffer ;)

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

  • Re: Vba code to copy values down in the same column


    Hi All ,


    Thanks for the solution ..it worked perfectly fine . Apologies for te double posting . Was the first time i was posting and hence the mistake . Will take care in future . Thanks everyone.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!