Actuarial Outpost
 
Go Back   Actuarial Outpost > Actuarial Discussion Forum > Software & Technology
FlashChat Actuarial Discussion Preliminary Exams CAS/SOA Exams Cyberchat Around the World Suggestions


Fill in a brief DW Simpson Registration Form
to be contacted when our jobs meet your criteria.


Reply
 
Thread Tools Display Modes
  #1  
Old 03-10-2008, 11:01 PM
SlowGo SlowGo is offline
Member
 
Join Date: Feb 2006
Posts: 145
Default Help with @risk - macros

Lets say I have simulated values in cell A1,A2 and A3 in excel and then cell A1=B1, A2=B2 and A3=B3

Then i want to sort the results in column B in chronological order after (copy->Paste Special->Values)

I created a macro name called "sort"

Now I want to run an iteration of each row 1,2,3 but I want to run the macro before each iteration...I tried the Simulation settings - > Macros -> "Clicked the "Before each iteration" tab

BUT when I run the similation I get error terms ..anyone know what step im missing?
Reply With Quote
  #2  
Old 03-11-2008, 12:53 AM
dumples dumples is offline
Member
 
Join Date: Sep 2003
Posts: 1,068
Default

are you naming the macro the same things that you tell at risk when you check the box?
Reply With Quote
  #3  
Old 03-11-2008, 06:47 AM
SlowGo SlowGo is offline
Member
 
Join Date: Feb 2006
Posts: 145
Default

I give it the same name as the name I gave the macro in excel
Reply With Quote
  #4  
Old 03-11-2008, 09:43 AM
whisper's Avatar
whisper whisper is offline
Member
CAS
 
Join Date: Jan 2002
Location: Chicago
Favorite beer: Hefewizen
Posts: 26,891
Default

Quote:
Originally Posted by SlowGo View Post
Lets say I have simulated values in cell A1,A2 and A3 in excel and then cell A1=B1, A2=B2 and A3=B3

Then i want to sort the results in column B in chronological order after (copy->Paste Special->Values)

I created a macro name called "sort"

Now I want to run an iteration of each row 1,2,3 but I want to run the macro before each iteration...I tried the Simulation settings - > Macros -> "Clicked the "Before each iteration" tab

BUT when I run the similation I get error terms ..anyone know what step im missing?
Do you get error terms? or are you getting an error and going to the debugger?

Are you generating error terms from the @Risk functions? Set up a dummy variable as an output that tests to see if your generating an error term in the variables and have @Risk stop if there are any errors in your output.
Reply With Quote
  #5  
Old 03-11-2008, 10:31 AM
SlowGo SlowGo is offline
Member
 
Join Date: Feb 2006
Posts: 145
Default

I am generating error terms


My macro copies information in an excel 3 row by 3 column format into another 3x3 row, colum array, then I apply the copy > paste special > values then sorts the last column..

I want this macro to run in a loop for the number of Iterations I want to perform in @ risk

when I run the macro, it does as I requested, but when I embbed the macro in @risk and then run the scenario, the results in the 3x3 row is what is given in the first row, first column only..and the end result in my output summary is a bunch of error terms

I m sure Im doing somethign wrong but I can't put a finger to it
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -4. The time now is 01:24 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
*PLEASE NOTE: Posts are not checked for accuracy, and do not
represent the views of the Actuarial Outpost or its sponsors.
Page generated in 0.13480 seconds with 7 queries