Bonjour à tous
Voila j'aimerais optimiser une requete qui est vraiment trop longue
sub essai()
a=0
b=0
c=0
d=0
e=0
f=0
for i=1 to 65536
Worksheets("Feuil1").Cells(i,1).Formulalocal="=dechex(" & f & ";2)"
Worksheets("Feuil1").Cells(i,2).Formulalocal="=dechex(" & e & ";2)"
Worksheets("Feuil1").Cells(i,3).Formulalocal="=dechex(" & d & ";2)"
Worksheets("Feuil1").Cells(i,4).Formulalocal="=dechex(" & c & ";2)"
Worksheets("Feuil1").Cells(i,5).Formulalocal="=dechex(" & b & ";2)"
Worksheets("Feuil1").Cells(i,6).Formulalocal="=dechex(" & a & ";2)"
a=a+1
if a=255 then b=b+1:a=0
if b=255 then c=c+1:b=0
if c=255 then d=d+1:c=0
if d=255 then e=e+1:d=0
if e=255 then f=f+1:e=0
next i
end sub
Voila j'aimerais optimiser une requete qui est vraiment trop longue
sub essai()
a=0
b=0
c=0
d=0
e=0
f=0
for i=1 to 65536
Worksheets("Feuil1").Cells(i,1).Formulalocal="=dechex(" & f & ";2)"
Worksheets("Feuil1").Cells(i,2).Formulalocal="=dechex(" & e & ";2)"
Worksheets("Feuil1").Cells(i,3).Formulalocal="=dechex(" & d & ";2)"
Worksheets("Feuil1").Cells(i,4).Formulalocal="=dechex(" & c & ";2)"
Worksheets("Feuil1").Cells(i,5).Formulalocal="=dechex(" & b & ";2)"
Worksheets("Feuil1").Cells(i,6).Formulalocal="=dechex(" & a & ";2)"
a=a+1
if a=255 then b=b+1:a=0
if b=255 then c=c+1:b=0
if c=255 then d=d+1:c=0
if d=255 then e=e+1:d=0
if e=255 then f=f+1:e=0
next i
end sub