excel - search for multiple values - loop -
i think can done in vba. tried vlookup, no luck.
i want search whole sheet values. these values come row in sheet. once each value found, looks top row , pulls value.
i might need loop through each value in row , search sheet there?
my thought/example:
sheet1!a:a 1234 5325 6346 6342
look in sheet 2 1234. lets found in cell g5, @ value in g1 , input cell a1 on sheet 2. i'm sorry making confusing.
here's have starting out:
sub findvalues() dim searchrow string dim searchrange range, cl range dim firstfound string dim sh worksheet ' set search value searchrow = sheets("sheet2").range("b:b")
getting error on last line. run-time error '13': type mismatch
you need set range object. cannot assign string unless looking property string address property.
dim searchrow string dim searchrange range searchrow = sheets("sheet2").range("b:b").address set searchrange = sheets("sheet2").range("b:b")
Comments
Post a Comment