This code is designed to search multiple worksheets and display the clinic ID number based on a dropdown box (cell B2) value the user selects...
If they select 'June' then it will search WSheets 'June', and 'JuneFlu'
Code (vb):
=IF(ISBLANK(INDIRECT(""&$B$2&"!$A"&ROW()-1)),IF(ISBLANK(INDIRECT(""&$B$2&"Flu"&"!$B3")),"",INDIRECT(""&$B$2&"Flu"&"!$B3")),INDIRECT(""&$B$2&"!$A"&ROW()-1))
The problem I have is when it searches the WSheet 'JuneFlu' it starts at the row where the first part of the search stopped (found blank cell). If there are 35 clinic in the 'June' WSheet, the second part of the search starts looking at row 35 on WSheet 'JuneFlu'.
How can I get it to start at the first row on each WSheet? I attempted to use SMALL but could not get it to work.
Thanks everyone.
If they select 'June' then it will search WSheets 'June', and 'JuneFlu'
Code (vb):
=IF(ISBLANK(INDIRECT(""&$B$2&"!$A"&ROW()-1)),IF(ISBLANK(INDIRECT(""&$B$2&"Flu"&"!$B3")),"",INDIRECT(""&$B$2&"Flu"&"!$B3")),INDIRECT(""&$B$2&"!$A"&ROW()-1))
The problem I have is when it searches the WSheet 'JuneFlu' it starts at the row where the first part of the search stopped (found blank cell). If there are 35 clinic in the 'June' WSheet, the second part of the search starts looking at row 35 on WSheet 'JuneFlu'.
How can I get it to start at the first row on each WSheet? I attempted to use SMALL but could not get it to work.
Thanks everyone.
Attachments
Last edited: