+ Reply to Thread
Results 1 to 3 of 3

Find All and Replace Offset Value

  1. #1
    Forum Contributor mccrimmon's Avatar
    Join Date
    02-19-2004
    Location
    Scotland
    MS-Off Ver
    2003
    Posts
    249

    Find All and Replace Offset Value

    Hi

    Im hoping someone can help me here.

    I have an array named vArr - which is created from a range of two columns of data storing both Currencies and Exchange Rates. This will be a variable range and somedays could contain 3 members like below and other days contain 100 members.

    CLP 999
    HUF 666
    IDR 100

    vArr(1,1) is CLP and vArr(1,2) is 999
    vArr(2,1) is HUF and vArr(2,2) is 666
    vArr(3,1) is IDR and vArr(3,2) is 100

    An example of my code is as follows:

    Please Login or Register  to view this content.
    I then have a list of Exchange Rate data (file attached).

    I want to loop through this list and find ALL INSTANCES of member vArr(I,1) in column D and then divide the cell to the right (column E) by member vArr(I,2)

    Can anyone help me on this?

    Cheers

    McCrimmon
    Attached Files Attached Files
    McCrimmon

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Find All and Replace Offset Value

    McCrimmon,

    I have attached a modified version of your sample workbook. The button is assigned the following macro:

    Please Login or Register  to view this content.


    Note - Change the following variables to the necessary values for the actual workbook:
    • wsAllData As Worksheet: the worksheet containing the full data list
    • DataCol: the column containing the codes (CLP, HUF, etc) for the full data list
    • DataRow: the row that the full data list starts on (not including header)
    • wsArrData: the worksheet containing the array variables
    • CodeCol: the column containing the array codes (CLP, HUF, etc)
    • ValuCol: the column containing the array values (numbers)
    • StartRow: the row that the array items start on (not including header)



    Hope this helps,
    ~tigeravatar
    Attached Files Attached Files

  3. #3
    Forum Contributor mccrimmon's Avatar
    Join Date
    02-19-2004
    Location
    Scotland
    MS-Off Ver
    2003
    Posts
    249

    Re: Find All and Replace Offset Value

    Thats great.
    Thanks for the help!

+ 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