Problem with Range Find in C++

Joined
Jul 16, 2009
Messages
3
Reaction score
0
Good day!

Ive been trying to get this to work for over an hour but I seem to be stumped.

My problem is. I want to search for a specific value inside the Excel file/range. Ive manage to do that. The found message box appears. but once there. I cant think of how to get its cell values? How can I know the row or column the value is located in. Here is my code. Any help would greatly be appreciated. Also, lets say I found the value in range (which is fromthe sheet A5 to D5). Is there any way to know in what cell it is located in inside the sheet? Since the ranges' 1st cell will be the one from A5, how will I know what cell it belongs to inside the sheet?

if ( range.Find(COleVariant("B4"), covOpt, xlFormulas, xlPart,
xlByRows, xlNext,xlIgnoreCase,covOpt, covOpt) ){
AfxMessageBox("Found");
} else {
AfxMessageBox("Not Found");
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top