Basically I have a function which searches a certain worksheet for the title of a column, and then returns the column number.
I also need another function which searches this column for a specified value. It would be neat for me to combine the two, but I'm not sure how to express the range to search in using the column number.
An outline of my code is below; there's not really much to say, I just don't know what to put in the Range bit
Cheers!
Function getValue(...parameters...) As Double col = getColumnNumber(worksheetName, columnTitle) 'get column number With Worksheets(worksheetName).Range(****) ...conditions for which value End With End Function