excel - Get adress of cell in function .Find -


i have code below, adress of cell in value if value found. because if macro find existing value in somerange, change value of cell. in advance idea.

range(somerange).select     set = selection.find(what:=something, after:=activecell, lookin:=xlvalues, _     lookat:=xlwhole, searchorder:=xlbyrows, searchdirection:=xlnext, _     matchcase:=false, searchformat:=false) 

you need guard against not finding anything.

dim range range(somerange).select on error resume next set = selection.find(what:=something, after:=activecell, lookin:=xlvalues, _    lookat:=xlwhole, searchorder:=xlbyrows, searchdirection:=xlnext, _    matchcase:=false, searchformat:=false) if not nothing      debug.print a.address(0, 0)      = "changed value" end if 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -