I'm working on a VBA userform that references searches a database of comparable rates for a project at work. Due to confidentiality issues I am unable to post the original file but I've made a quick mock-up that gives an example of the format of my data on a small scale. Column A is a list of units, column B has item categories and column C has the items within those categories. Basically, I've set up a userform with 3 combo boxes; combobox1 selects a project which actually dictates which worksheet is relevant, combo box 2 is a selection of the categories in Row B of that worksheet (without the empty rows between) and combobox C should generate an option for each of the items within that category. When you select the project, the category within that project and an item within that category, hit a "Check rates" command button and it searches the rows next to that item (rows D through ZZ have been allowed) and returns the maximum, minimum and average rates for the item.
From the example you can see that the first item is in cell B2 so the first item in that category is ("C" & (category1row +1)). Similarly the last item in that category can be defined in terms of the next category heading in the list. In other words, I'm asking if anyone knows how to return the row number of the category heading after the selected category in a combo box. If I can get that row number, the last item in each category can be defined by ("C" & (category2row -1)).
Any assistance you may be able to provide on this matter will be greatly appreciated and I'm happy to provide clarification if need be.