Reputation: 9813
probably a very simple question, but I am trying to match words in excel
If a word is found on range A1:a400 then replace the word in a different workbook with the first word in that row
wkbk 1
a1 = sun a200 = pear
pear is found
wkbk 2 a10 = sun (first word in row 1 in wbk 1)
this is all of course dynamic. Thank you in advance
here is where this takes place
If Not word = " " Then ' if not blank
If word = Cell.Value Then
fixedWord = Cell.Value(at the first word of this row)
workBookBeingChecked.Activate
Cell.Value(foundWordRange) = fixedWord ' cell in old place is replaced by this new cell
End If
Upvotes: 0
Views: 1524
Reputation: 2501
Amended to fit your updated question:
To get the first cell in a row based on a matched value use:
Range("C200").EntireRow.Columns(1).Value2
Upvotes: 1