Question
Excel - Find value using UsedRange in automation
Hi,
I want to check the value is exist or not in the excel. for ex: if user enters value in the textbox and then I will check whether this value is exists in excel or not. So, I used .net code as below.
Microsoft.Office.Interop.Excel.Range selectedRow = xlWorkSheet.UsedRange.Find(textBox1.Text, ................);
Instead of .net code how to find the value using usedrange as per attached image.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
You can do this but you will need a couple of scripts to provide the values you will need to call the method and to read the result. Start by adding these references to your script.
The first script will allow you to create an object to specify the SearchOrder parameter.
The next script returns the Address from a Range. This is not available directly through the design surface. Just pass in the range and it will return the Address.
Of course, you already have the last script for creating an object to specify Missing values.
My final automation is almost the same as yours: