+ Reply to Thread
Results 1 to 2 of 2

Divide range by range VBA

  1. #1
    Forum Contributor
    Join Date
    03-04-2013
    Location
    Europe
    MS-Off Ver
    Office 365 ProPlus
    Posts
    147

    Divide range by range VBA

    I'm frustrated because this must be the most basic function in vba, but anyhow.. I'm trying to divide a range by a range, so for example if I have A1:A10 and B1:B10 i want to perform A1/B1, A2/B2 and so on.. I found some solutions to this when the columns are adjacent by using "for each" and "offset", but now I want to do this with one range defined in my code and on range that's been defined/named in the workbook.

    Here's the code:
    Please Login or Register  to view this content.
    I want to add something that divides elementvise "rng" with a named range (Range("USD_EUR")) . I tried rng=rng.value/Range("USD_EUR"), but that won't work..
    Last edited by vizzkid; 03-22-2013 at 12:23 PM.

  2. #2
    Forum Contributor
    Join Date
    03-04-2013
    Location
    Europe
    MS-Off Ver
    Office 365 ProPlus
    Posts
    147

    Re: Divide range by range VBA

    Solved it myself.. FormulaArray is my new best friend

    Please Login or Register  to view this content.

+ 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