I have a macro that I recorded that grabs an Identifying ID pasts it into a sheet where it runs an XIRR then pasts that information back into another sheet. If the XIRR returns at 10% or more It should then run a Goal Seek to find out what it would take for the XIRR to be 10% or at most 10.001%. My question is how do I get the macro to continue running down a list of identifiers to run these functions and how do I tell it to run the goal seek if the XIRR returns at more then 10%. The list of IDs used for calculations will always change it'll never be the same count.
ID Sheet - Album on Imgur This is the sheet where the Identifier comes from and where I want the info after calculation pasted. Even if it doesn't hit 10% i still want information pasted back in this sheet.
Imgur: The most awesome images on the Internet This is the sheet where the XIRR and goal seek is done. F5 is the set cell, H5 is the value to change. Again I want to seek 10% or at most 10.001%
ID Sheet - Album on Imgur This is the sheet where the Identifier comes from and where I want the info after calculation pasted. Even if it doesn't hit 10% i still want information pasted back in this sheet.
Imgur: The most awesome images on the Internet This is the sheet where the XIRR and goal seek is done. F5 is the set cell, H5 is the value to change. Again I want to seek 10% or at most 10.001%
Code:
Sub Calc()'
' Calc Macro
'
'
Range("A2").Select
Selection.Copy
Sheets("Sheet1").Select
Range("D5").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Calculate
Range("E5").Select
Selection.Copy
Sheets("LLID Dump").Select
Range("B2").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Columns("B:B").EntireColumn.AutoFit
Range("A3").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
Range("E5").Select
Range("D5").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Calculate
Range("E5").Select
Selection.Copy
Sheets("LLID Dump").Select
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Columns("B:B").EntireColumn.AutoFit
Sheets("Sheet1").Select
Range("F5").Select
Application.CutCopyMode = False
Range("F5").GoalSeek Goal:=0.10001, ChangingCell:=Range("H5")
Selection.Copy
Range("F5:J5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("LLID Dump").Select
Range("C3").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
End Sub