1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| sub test()
dim a as integer
'On vérifie qu'il y a bien une cellule "machine" dans la colonne (ici col 1)
'Sinon la méthode find plante
if application.match("machine",range(cells(1,1),cell(65536,1)),0)) then
'On applique la méthode find (hyper rapide) avec l'option "xlwhole"
'qui permet de chercher la cellule ou il y a seulement marqué "machine"
'et pas "ma machine", sinon, il faut marquer "xlpart"
a=range(cells(1,1),cell(65536,1)).find(what:="machine",lookat:=xlwhole).row
if isempty(cells(a+1,1)) then cells(a+1,1)="EMULE"
end if
end sub |
Partager