Results 1 to 2 of 2

Sensitivity Matrix Hlookup

Threaded View

  1. #1
    Registered User
    Join Date
    06-11-2013
    Location
    Mexico
    MS-Off Ver
    Excel 2003
    Posts
    1

    Sensitivity Matrix Hlookup

    I have the following problem:

    - I have a file where I calculate a cash flow depending of several parameters and I want to construct a sensitivity matrix.
    - I have written a code where I copy each the first column value to the Cash Flow Model Assumptions.
    - Then I go back to the matrix and copy the first row value to the Assumptions sheet
    - then I go to the Cash Flow sheet and Hlookup the value of the row I pasted on the step before and i want to print this into the matrix first column and loop through all of the columns and all of the rows.

    The problem is that I manage to obtain the tir values i looked up but i can't print them into the matrix.

    Heres a sample of the code:


    Sub IrrMatrix1()
    
    Dim cap As Range
    Dim hold As Range
    Dim i As Integer
    i = 1
    
    For Each cap In Range("d9:h9")
        cap.Copy
        Sheets("Supuestos").Select
        Range("I24").Select
        Selection.PasteSpecial Paste:=xlValues
        Sheets("Sensitivities").Select
                For Each hold In Range("c10:c13")
                hold.Copy
                Sheets("Supuestos").Select
                Range("I23").Select
                Selection.PasteSpecial Paste:=xlValues
                
                Sheets("CF").Select
                tir = Application.WorksheetFunction.HLookup(hold, Range("$G$9:$X$75"), 66, False)
                
                tir = hold.Offset(0, i)
                Sheets("Sensitivities").Select
                Next hold
    
    Next cap
    i = i + 1
            
                
    
    End Sub
    Last edited by FDibbins; 06-11-2013 at 10:30 PM. Reason: Code tags added

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