VBA macro to give the value of a columns if conditions are met

Viewed 31

Let's say that i have an Excel file with 3 columns and I would like that if the first two columns contains a specific word, the macro show me the value of the cell in the third column that is on the same row of the first two columns. The values of the first two columns will always be on the same rows and the first two rows cannot contain the same words.

Maybe it can work with an Excel function like an If but i struggle to make it work. If anyone has some suggestion it will be very helpful.

Thanks :)

1 Answers

You can try the InStr() function combined with an AND statement and loop through all rows.

Related