Your formulae don't appear to work on the sheet you supplied.
However, if you place this formula in H1 (or any column but it must be in row 1 of the sheet):
=SMALL(IF(($C$5:$C$19=$C$1)*($D$5:$D$19=$D$1),$B$5:$B$19),ROW())
and array-enter it with Ctrl+Shift+Enter, then copy down until you get the #NUM! error, you will get your indices.
Do you still need vba?
If you copy down to more than the max number of rows you expect to find, you could wrap IFERROR arunf the formula:
=IFERROR(SMALL(IF(($C$5:$C$19=$C$1)*($D$5:$D$19=$D$1),$B$5:$B$19),ROW()),"" )
p45cal Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.