Using Range.Find() to find the first cell to NOT have a given value

Mortiray

New Member
Joined
Oct 27, 2022
Messages
37
Office Version
  1. 365
Platform
  1. Windows
Title. Is it possible just using the Range.Find() or any other method to find the first cell whose value isn't a given argument? I know I can manually iterate through a range and check the values but I'd really like a cleaner solution to this.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Probably not. There is no way to say "Find something that is not this." But there might a clever way to do it with wildcards, MATCH, or something else, depending on what you're doing. Describe the data. What is the value you want to exclude, and what other kinds of values are in the range?
 
Upvote 0
Probably not. There is no way to say "Find something that is not this." But there might a clever way to do it with wildcards, MATCH, or something else, depending on what you're doing. Describe the data. What is the value you want to exclude, and what other kinds of values are in the range?
I have an excel sheet with a bunch of rows each of which have data pertaining to projects I'm working on. One column on this sheet is the Status column, which has a range of values, most of with are "0. DONE" for projects that are already finished. Other statuses indicate how far along the project is (for example, 1. HOLD, 3. PWRK (need paperwork), 4. WRITE (write the project up), 6 PREP, 8. LIVE, etc. I wanted to use the Find function to be able to find the first row that isn't marked 0. DONE. I've already got a function that just manually checks every status cell until it finds one that isn't "0. DONE" but that isn't very elegant or efficient.
 
Upvote 0
Probably not. There is no way to say "Find something that is not this." But there might a clever way to do it with wildcards, MATCH, or something else, depending on what you're doing. Describe the data. What is the value you want to exclude, and what other kinds of values are in the range?

I have an excel sheet with a bunch of rows each of which have data pertaining to projects I'm working on. One column on this sheet is the Status column, which has a range of values, most of with are "0. DONE" for projects that are already finished. Other statuses indicate how far along the project is (for example, 1. HOLD, 3. PWRK (need paperwork), 4. WRITE (write the project up), 6 PREP, 8. LIVE, etc. I wanted to use the Find function to be able to find the first row that isn't marked 0. DONE. I've already got a function that just manually checks every status cell until it finds one that isn't "0. DONE" but that isn't very elegant or efficient.
I think I've found a workaround. For the Done lines, instead of it being 0. DONE, i'm changing it to 0, DONE. Then I can have the find argument be "?.*" since the second character of all the others is a period and not a comma
 
Upvote 0
Solution
I think I've found a workaround. For the Done lines, instead of it being 0. DONE, i'm changing it to 0, DONE. Then I can have the find argument be "?.*" since the second character of all the others is a period and not a comma
Even better, instead of a comma, I found a unicode character (0xA4F8) that looks super similar to a period but is recognized differently by the program
 
Upvote 0
That's the kind of "clever" way approach that I thought might be a workaround. Nice job.
 
Upvote 0

Forum statistics

Threads
1,215,216
Messages
6,123,669
Members
449,114
Latest member
aides

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top