capturing all data from random formulas?

excelNewbie22

Well-known Member
Joined
Aug 4, 2021
Messages
510
Office Version
  1. 365
Platform
  1. Windows
hi,
is there any way (except manually copy values) to save every data resulted from random formulas?
each time i hit F9?
for instance copy results from j2 : o2 onto q2:w2 and next one's to q3:w3 and so on
and if there's more rand formulas in j to o column's copy them too again and again (not overwrite)
maybe a macro?

test.xlsb
CDEFGHIJKLMNO
2123456411514511
31112131415165164111513
4123456
5111213141516
6123456
7111213141516
8123456
9111213141516
10123456
11111213141516
test
Cell Formulas
RangeFormula
J2:J3J2=INDEX(TOCOL(C3:H10,1),RANDBETWEEN(1,12))
K2:K3K2=LET(a,TOCOL(C3:H10,1),f,FILTER(a,ISNA(MATCH(a,J2:J2,0))),INDEX(f,RANDBETWEEN(1,ROWS(f))))
L2:L3L2=LET(a,TOCOL(C3:H10,1),f,FILTER(a,ISNA(MATCH(a,J2:K2,0))),INDEX(f,RANDBETWEEN(1,ROWS(f))))
M2:M3M2=LET(a,TOCOL(C3:H10,1),f,FILTER(a,ISNA(MATCH(a,J2:L2,0))),INDEX(f,RANDBETWEEN(1,ROWS(f))))
N2:N3N2=LET(a,TOCOL(C3:H10,1),f,FILTER(a,ISNA(MATCH(a,J2:M2,0))),INDEX(f,RANDBETWEEN(1,ROWS(f))))
O2:O3O2=LET(a,TOCOL(C3:H10,1),f,FILTER(a,ISNA(MATCH(a,J2:N2,0))),INDEX(f,RANDBETWEEN(1,ROWS(f))))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C3:H3,C5:H5,C7:H7,C9:H9,C11:H21Expression=COUNTIF(#REF!,C3)>0textNO
I2072:I1048576,I1:I2052Cell Value=6textNO
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Hi,
May be with a formula =ISNUMBER(SEARCH("rand*",FORMULATEXT(J2)))
 
Upvote 0
i think you got me wrong james,
i meant a way to save each results again and again in different columns
like this, did it manually just for example
test
CDEFGHIJKLMNOPQRSTUVW
1wanted result generated from j2:o3
21234564165152121332121416
3111213141516432513111511161512
41234563251414
5111213141516116412313
61234563411621
71112131415161116612145
8123456
9111213141516
10123456
11111213141516
test
Cell Formulas
RangeFormula
J2:J3J2=INDEX(TOCOL(C3:H10,1),RANDBETWEEN(1,12))
K2:K3K2=LET(a,TOCOL(C3:H10,1),f,FILTER(a,ISNA(MATCH(a,J2:J2,0))),INDEX(f,RANDBETWEEN(1,ROWS(f))))
L2:L3L2=LET(a,TOCOL(C3:H10,1),f,FILTER(a,ISNA(MATCH(a,J2:K2,0))),INDEX(f,RANDBETWEEN(1,ROWS(f))))
M2:M3M2=LET(a,TOCOL(C3:H10,1),f,FILTER(a,ISNA(MATCH(a,J2:L2,0))),INDEX(f,RANDBETWEEN(1,ROWS(f))))
N2:N3N2=LET(a,TOCOL(C3:H10,1),f,FILTER(a,ISNA(MATCH(a,J2:M2,0))),INDEX(f,RANDBETWEEN(1,ROWS(f))))
O2:O3O2=LET(a,TOCOL(C3:H10,1),f,FILTER(a,ISNA(MATCH(a,J2:N2,0))),INDEX(f,RANDBETWEEN(1,ROWS(f))))
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,820
Members
449,469
Latest member
Kingwi11y

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top