Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Simple VBA question for Excel

Options
  • 04-08-2011 9:51am
    #1
    Registered Users Posts: 974 ✭✭✭


    Looking to do this without a loop.

    So any range maybe be selected of x size.
    Private Sub NoLoop()
     
    [COLOR=white](tab)[/COLOR]With Selection
    [COLOR=white](tabtab)[/COLOR].Value = .Value * 1000
    [COLOR=white](tab)[/COLOR]End with
     
    End sub
    

    How can I do this?

    Multiply each cell in selection by a number without using any loops.

    Cheers.


Comments

  • Registered Users Posts: 4,277 ✭✭✭km991148


    jme2010 wrote: »
    Looking to do this without a loop.

    So any range maybe be selected of x size.
    Private Sub NoLoop()
     
    [COLOR=white](tab)[/COLOR]With Selection
    [COLOR=white](tabtab)[/COLOR].Value = .Value * 1000
    [COLOR=white](tab)[/COLOR]End with
     
    End sub
    

    How can I do this?

    Multiply each cell in selection by a number without using any loops.

    Cheers.

    Looks like you are trying to answer a typical Recursion question (perhaps covered earlier in the course?). Google for replacing iteration with recursion for some pointers.


Advertisement