+ Reply to Thread
Results 1 to 2 of 2

Macro to apply USD inflation rates to values in a dynamic range

  1. #1
    Registered User
    Join Date
    05-29-2018
    Location
    NYC
    MS-Off Ver
    2007
    Posts
    1

    Question Macro to apply USD inflation rates to values in a dynamic range

    SO. I'm still pretty new to Excel macros, and found myself needing one a little over my skill level...

    I have two sheets within the same workbook, Sheet 1 contains a ton of data, all from the last 10 years. Relevant to this macro are year values, a dollar value, and percentage increase. Sheet 2 contains only two columns, year and USD($) Inflation Rates, Year Over Year.

    Essentially what I need to do is use the data in sheet 2 to adjust a dollar value in sheet 1 and apply it to an open column in sheet 1. It's, what I understand to be, a dynamic range, so the percentages are not the same for each year. For example: if the Sheet 1 dollar value is from 2010, I need to aggregate the inflation rates on sheet 2, apply them, and put the 2010 value into 2018 dollars. However, on sheet one, the years are randomized and not chronological. So I need some way of telling Excel to match the years between the sheets, and if the years are equal, run some loop up to 2018 on sheet 2 to adjust to 2018 dollars. It doesn't seem all that complicated, I just do not know how to do it.

    If it helps: the sheet 2 values are:

    2009 2.70%
    2010 1.50%
    2011 2.00%
    2012 1.70%
    2013 1.50%
    2014 0.80%
    2015 0.70%
    2016 2.10%
    2017 2.10%
    2018 1.90%


    Any help you guys can provide would be amazing!

    Thanks

    Michael

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to apply USD inflation rates to values in a dynamic range

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Apply Slab Rates????
    By ndmalam in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 06-10-2020, 09:37 AM
  2. [SOLVED] Loop through/apply filter to non blank columns of dynamic range
    By stevoDE in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2017, 10:41 AM
  3. [SOLVED] How to calculate This year's value of historic data using annual Inflation rates
    By highlystrung in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-02-2013, 04:50 PM
  4. dynamic range in macro to apply calculations
    By psrs0810 in forum Excel General
    Replies: 2
    Last Post: 11-09-2010, 08:59 AM
  5. Working out a price when different rates apply?
    By jason7579 in forum Excel General
    Replies: 3
    Last Post: 02-04-2010, 07:01 PM
  6. VBA code needed to apply formula to each value in a dynamic range!
    By burk in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-03-2006, 09:00 AM
  7. [SOLVED] Return a value associated with a range of values, e.g. tax rates
    By Mr.Boul in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2006, 11:36 PM

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