Sub text () Dim I As an Integer, j As an Integer, As an Integer k, l, As an Integer Dim arr () Arr ()=Range (" a1: a48 ") For I=1 To 48 For j=1 To 48 For k=1 To 48 For l=1 To 48 If arr (I, 1) + arr (j, 1) + arr (k, 1) + arr (l, 1)=664.04 Then Range (" d3 ")=arr (I, 1) Range (" e3 ")=arr (j, 1) Range (" f3 ")=arr (k, 1) G3 Range (" ")=arr (l, 1) End the If Next Next Next Next End Sub
Want to violence and exhaustive four number, why sometimes ask out sometimes not to come out again? The small white, thank you all for the great god
CodePudding user response:
Sub demo () Dim I As an Integer, j As an Integer, As an Integer k, l, As an Integer Dim arr () Arr ()=Range (" a1: a48 "). The Value For I=1 To 48-3 For j=I - 2 To 48 For k=j To 48-1 For l=To 48 k If arr (I, 1) + arr (j, 1) + arr (k, 1) + arr (l, 1)=664.04 Then Range (" d3 ")=arr (I, 1) Range (" e3 ")=arr (j, 1) Range (" f3 ")=arr (k, 1) G3 Range (" ")=arr (l, 1) End the If Next l Next k Next j Next I End Sub
CodePudding user response:
Sub demo () Dim I As an Integer, j As an Integer, As an Integer k, l As an Integer, the index As an Integer The index=1 Dim arr () Arr ()=Range (" a1: a48 "). The Value For I=1 To 48-3 For j=I - 2 To 48 For k=j To 48-1 For l=To 48 k If arr (I, 1) + arr (j, 1) + arr (k, 1) + arr (l, 1)=664 Then Range (" d "& amp; The index)=arr (I, 1) Range (" e "& amp; The index)=arr (j, 1) Range (" f "& amp; The index)=arr (k, 1) Range (" g "& amp; The index)=arr (l, 1) The index=index + 1 End the If Next l Next k Next j Next I End Sub