TheRedCardinal
Active Member
- Joined
- Jul 11, 2019
- Messages
- 252
- Office Version
- 365
- 2021
- Platform
- Windows
I need to find the highest x values in a range, and then do things with them.
My truncated code does this:
Searchvalue has a value after the first line, but after the second line, CellB is Nothing.
How is this possible?
Searchvalue is defined as double, as some of the values have decimal places, but in the immediate window it doesn't have any decimal places - is that a clue?
My truncated code does this:
VBA Code:
SearchValue = Application.WorksheetFunction.Large(WorkingRange, Counter)
Set CellB = WorkingRange.Find(SearchValue, , xlValues)
Searchvalue has a value after the first line, but after the second line, CellB is Nothing.
How is this possible?
Searchvalue is defined as double, as some of the values have decimal places, but in the immediate window it doesn't have any decimal places - is that a clue?