(Excel Vba) Copy paste of multiple columns

[Closed]
Report
Posts
1
Registration date
Friday April 28, 2017
Status
Member
Last seen
April 28, 2017
-
Posts
2817
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 14, 2021
-
Hi All,
I am stacked with a simple VBA macro. I have an excel sheet containing a number of columns and i have created a Montecarlo simulation where column AW and AX are automatically updated all the time. In particular AW contains Text and AX contains numbers and the values are matched. For example:
A 1
B 2
C 1
D 4
E 3
F 2 and so on... Basically what I want to do is to create a macro that reads the 32 values of columns AW and AX and prints it in another worksheet in the same excel file. We also need to ensure that all the 32 values for each column are printed out before running the next iteration.
As an extra info: the order of the letters in the first column changes according to the iteration, so for example the outcome of iteration 2 could be;
J 3
M 2
A 4
B 3
C 1


Optionally it would be great to get some automatically calculated statistics such as % of times A=1,2,3 and 4 and so on for all the 32 text values. Thank you very much for your help beforehands!

1 reply

Posts
2817
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 14, 2021
486
Hi Carlius83,

Could you show us what the destination sheet looks like.

Doing so, the following should be clear:
Does each iteration come below each other?
Where do you want the statistics show?
Are the statistics for one iteration or for all so far?

Also do you want to clear the iteration from the source sheet to make room for the next iteration?

Best regards,
Trowa