Alright, so here's what I'm trying to do:
I have a table that is 10 columns and 24 rows. It has percents in it. I need to create some tables farther down that are the same size that multiplies the percents in the first table by a certain value for each row of the new table. If it makes it easier to understand the first table stretches from column D1 to M24. Then for every table farther down in the same sheet there will be numbers in column C. Let's say that In D1 is 5% and in C 101 (new table) there is 1000. Then D101 would be .05*1000.
In order to do this I wanted to read in the intial table as an array and store it. Then multiply the array by the values in column C for each table and paste the values into the table.
Let me know if this is unclear. I appreaciate the help.
Hello gryffin13,
To better illustrate your problem, you should post your workbook with both before and after examples of the data. Having the workbook greatly reduces coding time and produces solutions that work correctly.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Ok here is my workbook. The first section is a "before" and the second is the "after". Obviously this is easy to do manually with formulas. This is more of a challenge to myself as a beginner to vba. Does this help make things clearer?
Hello gryffin13,
The percentage tables are 25 rows by 10 columns and have 3 blank rows. Presumably if there is a one to one correspondence between the percentage table and new table then how do you want to handle the empty cells when multiplying the values?
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
That was an oversight on my part. The bottom row of the percent tables (it's over 100% for most of them) should just be deleted. Sorry.
And as for empty cells, it can be treated as a 0. Then when it's multiplied by anything it will still be zero.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks