cancel
Showing results for 
Search instead for 
Did you mean: 

Prompt while executing a macro

Former Member
0 Kudos

Hi Gurus,

I need help in writing a logic for a macro for the below scenario:

Scenario: Copy values from KF1 to KF2 based on user input in the planning book.

If the user wants to adopt 75% or 125% or 150% or whatever may be the percentage of KF1 to be copied to KF2, we want the user to able to input those values interactively and then the macro should compute and update KF2.

Can anyone provide step by step approach to achieve this?

Thanks,

Murali

Accepted Solutions (0)

Answers (1)

Answers (1)

jagannadhb
Active Participant
0 Kudos

Hi Murali,

You can achieve this scenario interactively by creating a Default Macro (Create regular macro and assign to default so that as soon as you enter a value in KF1 and save, KF2 will be calculated)

Case 1: If you want to adopt a specific percentage (say 75%), the logic is simple,

Row: KF2

= (75/100)*(Row: KF1)

Case 2: If the % keeps fluctuating every period, then create a new Key Figure (say KF3) for the factor

Row: KF2

= ((Row: KF3)/100)*(Row: KF1)

when KF3 = 75 (for 75%).

If KF3 = 0.75, then

Row: KF2

= (Row: KF3)*(Row: KF1)

Hope this helps.

Regards,

JB