Young Grasshopper
Board Regular
- Joined
- Dec 9, 2022
- Messages
- 58
- Office Version
- 365
- 2016
- Platform
- Windows
Hello world!
I have this formula:
=LOOKUP(1, 0/FREQUENCY(0, 1/(1+H1:V1)),G11:U11)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H2:V2)),G11:U11)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H3:V3)),G11:U11)
This formula gives three random values from G11:U11 as long as the corresponding helping row, H1:V1, H2:V2 etc, is bigger den 0.
(Random since the values in H1:V1 is generated from fromula; =IF(LEN(G11)=0,0,RAND()
I'm trying to copy this formula down a column for about 100 rows, but the H:V ranges get a little messed up when copying the formula down. Right now it would go;
1+H1:V1,1+H2:V2,1+H3:V3
1+H2:V2, 1+H3:V3,1+H4:V4
1+H3:V3, 1+H4:V4,1+H5:V5
But need this formula to go;
(Row1) =LOOKUP(1, 0/FREQUENCY(0, 1/(1+H1:V1)),G11:U11)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H2:V2)),G11:U11)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H3:V3)),G11:U11)
(Row2) =LOOKUP(1, 0/FREQUENCY(0, 1/(1+H4:V4)),G12:U12)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H5:V5)),G12:U12)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H6:V6)),G12:U12)
(Row3) =LOOKUP(1, 0/FREQUENCY(0, 1/(1+H7:V7)),G13:U13)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H8:V8)),G13:U13)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H9:V9)),G13:U13)
I understand that this is just how excel would calculate this logically, but is there any way to control this or rewrite the code in a different way?
Or is it just better to do all 100 lines manually?
Would appreciate any help
I have this formula:
=LOOKUP(1, 0/FREQUENCY(0, 1/(1+H1:V1)),G11:U11)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H2:V2)),G11:U11)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H3:V3)),G11:U11)
This formula gives three random values from G11:U11 as long as the corresponding helping row, H1:V1, H2:V2 etc, is bigger den 0.
(Random since the values in H1:V1 is generated from fromula; =IF(LEN(G11)=0,0,RAND()
I'm trying to copy this formula down a column for about 100 rows, but the H:V ranges get a little messed up when copying the formula down. Right now it would go;
1+H1:V1,1+H2:V2,1+H3:V3
1+H2:V2, 1+H3:V3,1+H4:V4
1+H3:V3, 1+H4:V4,1+H5:V5
But need this formula to go;
(Row1) =LOOKUP(1, 0/FREQUENCY(0, 1/(1+H1:V1)),G11:U11)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H2:V2)),G11:U11)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H3:V3)),G11:U11)
(Row2) =LOOKUP(1, 0/FREQUENCY(0, 1/(1+H4:V4)),G12:U12)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H5:V5)),G12:U12)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H6:V6)),G12:U12)
(Row3) =LOOKUP(1, 0/FREQUENCY(0, 1/(1+H7:V7)),G13:U13)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H8:V8)),G13:U13)&" "&"|"&" "&LOOKUP(1, 0/FREQUENCY(0, 1/(1+H9:V9)),G13:U13)
I understand that this is just how excel would calculate this logically, but is there any way to control this or rewrite the code in a different way?
Or is it just better to do all 100 lines manually?
Would appreciate any help