how can vba excel give a maximum value in a certain code -
i have vba code:
private sub vérification1_click() = 4 1295 sheets("poteauxw").range("c57").value = sheets("efforts poteauxw").cells(i, 6) sheets("poteauxw").range("d57").value = sheets("efforts poteauxw").cells(i, 13) sheets("poteauxw").range("e57").value = sheets("efforts poteauxw").cells(i, 8) if sheets("poteauxw").range("h57") = "ng" msgbox "ng on " & exit sub end if next msgbox "ok" end sub
how can add option code gives me maximum value of cell sheets("poteauxw").range("u57")
while goes through values?
private sub vérification1_click() maxu57=sheets("poteauxw").range("u57") maxrow=0 = 4 1295 sheets("poteauxw").range("c57").value = sheets("efforts poteauxw").cells(i, 6) sheets("poteauxw").range("d57").value = sheets("efforts poteauxw").cells(i, 13) sheets("poteauxw").range("e57").value = sheets("efforts poteauxw").cells(i, 8) if maxu57<sheets("poteauxw").range("u57").value maxu57=sheets("poteauxw").range("u57").value maxrow=i end if if sheets("poteauxw").range("h57") = "ng" msgbox "ng on " & & " max u57=" & maxu57 & " found row="&i exit sub end if next msgbox "ok" & " max u57=" & maxu57 & " found row="&i end sub
Comments
Post a Comment