MrKowz
Well-known Member
- Joined
- Jun 30, 2008
- Messages
- 6,653
- Office Version
- 365
- 2016
- Platform
- Windows
This isn't a particular issue I need to solve, but moreso something I'm trying to research and not finding much on a handful of Google searches.
Background - I recently helped a user debug an issue with some code and tracked it down to the number formatting of some cells. The user had the "Accounting" number format chosen for cells which contained string data ("Yes"/"No"). What I've found is that neither the VBA Find method (set rng = .find(value, lookin:=xlvalues, lookat:=xlwhole)) or using CTRL+F is able to find the "Yes" which has that format chosen.
Upon further testing, I've been able to replicate the issue and also extend it to any formatting which includes errant spaces before/after the @. For example, the formats " @" and "@ " both yielded the same results - the find method and ctrl+f couldn't find the values.
Just wondering if anyone else has seen this before and if this is just an accepted bug or anything. It really struck me as bizzare since I was always under the impression that cell values were not impacted in any way by cell formatting.
Background - I recently helped a user debug an issue with some code and tracked it down to the number formatting of some cells. The user had the "Accounting" number format chosen for cells which contained string data ("Yes"/"No"). What I've found is that neither the VBA Find method (set rng = .find(value, lookin:=xlvalues, lookat:=xlwhole)) or using CTRL+F is able to find the "Yes" which has that format chosen.
Upon further testing, I've been able to replicate the issue and also extend it to any formatting which includes errant spaces before/after the @. For example, the formats " @" and "@ " both yielded the same results - the find method and ctrl+f couldn't find the values.
Just wondering if anyone else has seen this before and if this is just an accepted bug or anything. It really struck me as bizzare since I was always under the impression that cell values were not impacted in any way by cell formatting.