Help With Macros - Number of cells to generate data based on the value in another cell?

Aussie5380

New Member
Joined
Sep 30, 2022
Messages
32
Office Version
  1. 2019
Platform
  1. Windows
Hey there,

New to macros, but learning a lot. Needing some assistance with finalizing a calculator i have created.

Basically i want 2 lots of cells to generate (One with a fortnightly date, and one with a $ amount which is worked out in the calculator)

It looks like this:

1664713268505.png



I want the recovery dates hidden, and the amount per pay hidden until there is a number in the above highlighted cell, and for it to only generate the number of lines listed in the above cell (in this case 5 pays has been set so i want to see 5 dates listed and the amount per pay, which is already calculated in the sheet)

I have tried conditional formatting, and im not a big fan of it, and its still leaving to much room for human error.

Is this possible through a macro? And how would i apply this?

Thanks for your help!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi Aussie5380!

This would be my approach:

In the cell with your first recovery date, enter this formula:
=IF(B5>0,B8+B10*14,"")

Change the following based on what cells your info is in:
B5 = Pays to Split Over
B8 = Current Pay Date
B10 = How Many Deductions are Already Set Up


In the cell with your second recovery date, enter this formula:
=IF(B5>1,A13+14,"")

Change the following based on what cells your info is in:
B5 = Pays to Split Over
A13 = First Recovery Date



In the cell with your third recovery date, enter this formula:
=IF(B5>2,A14+14,"")

Replace the cells with your own, and keep going as far down as you need.



In the cell with your first Amount Per Pay, enter this formula:
=IF(A13="","",your formula here)

Replace A13 with wherever your first recovery date is.
Copy that formula down as far as your Recovery Date column goes.


Hopefully this makes sense, and is what you're looking for!


All the best,
Matt
 
Upvote 0
Solution

Forum statistics

Threads
1,215,598
Messages
6,125,748
Members
449,258
Latest member
hdfarid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top