Hi all,
I have created a macro that provides me with a data overview, rather helpful.
However, for each row I would have to add a formula in a column which multiplies a value in that row with a header value.
Let me explain by the attached example.
Explanation of attached file:
I get a "header" name in cell B2 and every 22th row below (for 100,000 rows), thus row 2 + (i * 22).
I get a "header" value in cell C2 and every 22th row below (for 100,000 rows), thus row 2 + (i * 22).
Below each name&value are a maximum of 20 rows with data for each name, but it can be less as well. There can even be no data, but then the starting cell (B3 and row 3 + (i * 22)) would show something like "no data available".
Question:
Would it be possible to build a VBA code in a separate sub() module that puts a formula (or the value, if the VBA can calculate the value) in column L for each row with data, that multiplies the value in column E with the "header" value?
I have included the formula for the first 2 sets of data. For B3:K22 the formula refers to C2 value, for B25:K31 the formula refers to C24 and this should continue in a similar fashion.
Thinking out loud:
It might be less stressful for excel to have VBA calculate the value (of multiplying value in the E column and respective row with the "header" value) than it is to insert the formula in column L instead? Because in the latter case, it would have to insert a formula and excel would have to execute the formula after VBA has run its course?
Hope someone can help with this matter.
Thank you in advance.
Bookmarks