ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy past loop (https://www.excelbanter.com/excel-programming/385499-copy-past-loop.html)

Aqib Rizvi[_2_]

Copy past loop
 
I have over 1000 rows in which I have random numbers generated through
Rand() In the next column, I have If formula that tells me if the
random is equal or over .5. I have total at the column end which
calculates result.

I need to copy, paste as value, the result 1000 times in the third
column. I need a VBA code for it and will appreciate any help.
Thanks.


Instance Randum Over .5 Total
1 0.75531777 1 11
2 0.24115034 0 9
3 0.58654479 1 8
4 0.43096180 0 5
5 0.98913511 1 11
6 0.55350200 1 13
7 0.63553569 1 8
8 0.96183014 1 9
9 0.97235357 1 9
10 0.47758409 0 12
Total 12


Don Guillett

Copy past loop
 
range("c1:c100").value=range("c1:c1000").value

--
Don Guillett
SalesAid Software

"Aqib Rizvi" wrote in message
ups.com...
I have over 1000 rows in which I have random numbers generated through
Rand() In the next column, I have If formula that tells me if the
random is equal or over .5. I have total at the column end which
calculates result.

I need to copy, paste as value, the result 1000 times in the third
column. I need a VBA code for it and will appreciate any help.
Thanks.


Instance Randum Over .5 Total
1 0.75531777 1 11
2 0.24115034 0 9
3 0.58654479 1 8
4 0.43096180 0 5
5 0.98913511 1 11
6 0.55350200 1 13
7 0.63553569 1 8
8 0.96183014 1 9
9 0.97235357 1 9
10 0.47758409 0 12
Total 12





All times are GMT +1. The time now is 02:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com