Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Simple VBA question for Excel

  • 04-08-2011 08:51AM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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