Find string in range where values are not displayed because they exceed column width

  • Hi there,


    Im trying to find, in VBA, a value within a defined range (from now on SearchRange). The problem is that the width of the columns containing the SearchRange must be narrower than the width that would allow the values in the SearchRange to be displayed (I am only using the SearchRange as an accesory, and the row containing it is hidden).


    The SearchRange consists of a unique row, containing dates from 1st of january to 31st of july (but its not relevant to the case that the values are dates as i also tried converting them to numbers and the result is the same).


    The problem is that Find function doesn't work when the value is not displayed (which i find somewhat awkward and disturbing). I also tried with application.match function, but didn't manage to make it work (despite that, i know match works even when the SearchRange is hidden, as i do this in other workbooks, although is use it to get the row reference, which i later use to obtain the cell im looking for)


    Can somebody help me findind the optimal way to pursuit this task? If not, i'd be forced to autofit columns, do the search, and set them back to their original width, or some other inefficient way... but the macro is already pretty complex and takes plenty of time, and im trying to optimisize it as much as possible.


    Thanks in advance,


    Alberto P.

  • Re: Find string in range where values are not displayed because they exceed column wi


    I've just used .Find to return a value searching a hidden row!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!