Below is an excerpt from a workbook I am attempting to build. I have been trying to automate the population of the correct range of rows in column F based on data input into columns B, C and D. The data in this example is manually entered to demonstrate my desired results.
Knowing each row will always be in 15 minute increments, with cell F7 selected, I would like to populate the correct number of rows including and below F7 with the T. Basal units based on the T. Basal % change (column C) multiplied by the Basal interval units (column B). Specifically, in this example, reduce 0.05 by 50% in 8 total rows (2 hours divided by 15 minute increments), rows 7 through 14.
Knowing the starting cell will change within column F and the inputs in columns B, C and D will also change, I would ideally like the code to look to the inputs, adjust the value and cell range appropriately and enter the values. I have tried multiple times and my minimal knowledge of VBA has only led to frustrating failure (Waa, waa, waa!). Any help is greatly appreciated. Even just a start.
Thanks,
Harry
<tbody>
</tbody>
Knowing each row will always be in 15 minute increments, with cell F7 selected, I would like to populate the correct number of rows including and below F7 with the T. Basal units based on the T. Basal % change (column C) multiplied by the Basal interval units (column B). Specifically, in this example, reduce 0.05 by 50% in 8 total rows (2 hours divided by 15 minute increments), rows 7 through 14.
Knowing the starting cell will change within column F and the inputs in columns B, C and D will also change, I would ideally like the code to look to the inputs, adjust the value and cell range appropriately and enter the values. I have tried multiple times and my minimal knowledge of VBA has only led to frustrating failure (Waa, waa, waa!). Any help is greatly appreciated. Even just a start.
Thanks,
Harry
A | B | C | D | E | F | G | |
1 | Date and Time | Basal | T. Basal | T. Basal Time | T. Basal Time | T. Basal | Basal Net |
2 | mm/dd/yy hh:mm AM/PM | interval units insulin | % change | hours | days | units Insulin | units Insulin |
3 | 07/87/2018 9:45 AM | 0.0500 | 0.05 | ||||
4 | 07/87/2018 10:00 AM | 0.0500 | 0.05 | ||||
5 | 07/87/2018 10:15 AM | 0.0500 | 0.05 | ||||
6 | 07/87/2018 10:30 AM | 0.0500 | 0.05 | ||||
7 | 07/87/2018 10:45 AM | 0.0500 | -50% | 2 | 0.083333333 | 0.0250 | 0.025 |
8 | 07/87/2018 11:00 AM | 0.0500 | 0.0250 | 0.025 | |||
9 | 07/87/2018 11:15 AM | 0.0500 | 0.0250 | 0.025 | |||
10 | 07/87/2018 11:30 AM | 0.0500 | 0.0250 | 0.025 | |||
11 | 07/87/2018 11:45 AM | 0.0500 | 0.0250 | 0.025 | |||
12 | 07/87/2018 12:00 PM | 0.0500 | 0.0250 | 0.025 | |||
13 | 07/87/2018 12:15 PM | 0.0500 | 0.0250 | 0.025 | |||
14 | 07/87/2018 12:30 PM | 0.0500 | 0.0250 | 0.025 | |||
15 | 07/87/2018 12:45 PM | 0.0500 | 0.05 | ||||
16 | 07/87/2018 1:00 PM | 0.0500 | 0.05 | ||||
17 | 07/87/2018 1:15 PM | 0.0500 | 0.05 |
<tbody>
</tbody>