Link to home
Start Free TrialLog in
Avatar of -Polak
-PolakFlag for United States of America

asked on

Simple Custom Macro Requested

Hello Experts,
Wondering if you could aid me with a simple Macro. I've attached a file to work from.

Background
Under each Blue Header there are 3 Historical Values for "Sorties". Further, there are 3 "Planning" values that correspond to each historical value.

Requirements:

1.

I would like a macro that when executed would allow the end-user to increase, the "Day" Historical Value (cell B7) by a user-chosen %. This then will populate the Day Planning (cell C7) with the value + the % increased.

2.

I would like the macro to apply to each blue heading/section

3.

I would like if the macro were as dynamic as possible; for example, if a blue heading were to be deleted/added I'd like if the macro didn't have to be re-coded (optional, let me know if this is not possible); moreover, I am contemplating deleting the "Year" row (row 9) so it would be nice if it didn't mess up the macro.

4.

Don't know if this matters, but in the sensitive version of this workbook the blue headings values as well as the historical values are calculated using INDIRECT VLOOKUPs and SUMIFs based on other worksheets
Thanks in advance guys! (and gals)
ExpertsExchangeFile-SAFE.xlsx
ASKER CERTIFIED SOLUTION
Avatar of Harry Lee
Harry Lee
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of -Polak

ASKER

Pretty good! Quick question, if i increase by 10% and then decrease by -10% why don't I end up back at the same numbers?

To this end, could you input a reset values function into the macro?
What it did is not calculating from the Planning (Column C). The calculation is always starting with Historical (Column B),

If you want it to start all the calculations from the Planning Rate, I can reconfigure it for you.

The reason I'm using the Historical is because of your Point 1.
Avatar of -Polak

ASKER

Ah, gotcha; that makes sense, no let's keep it on the historicals. Anyway to add a reset values function on the day planning?
The way to have it reset is basically punch in 0 in the pop up input box.
Avatar of -Polak

ASKER

Ya, I did figure that out. Can you code a "reset values" button into the user-prompt that places a 0 in there and just executes?
It's much more than just adding a button on the the user prompt.

It's currently using a internal template. In order to add a button to it, will have to draw up the user prompt form as a UserForm and it's much more work.
Avatar of -Polak

ASKER

Understood, this will work! I'll just add some instructions to enter 0 to reset, thank you for your help!