Good afternoon all,
I'm looking for a way to use the Select Case VBA to run with multiple sets of Criteria; Ill elaborate below.
I'm currently using the below code.
Select Case Sheets("Questionairr").Range("O22").Value
Case 1: Sheets("Products To Be").Range("8599:8602, 8999:9002").EntireRow.Hidden = False
Case 2: Sheets("Products To Be").Range("8599:8606, 8999:9006").EntireRow.Hidden = False
Case 3: Sheets("Products To Be").Range("8599:8610, 8999:9010").EntireRow.Hidden = False
Case 4: Sheets("Products To Be").Range("8599:8614, 8999:9014").EntireRow.Hidden = False
Case 5: Sheets("Products To Be").Range("8599:8618, 8999:9018").EntireRow.Hidden = False
Case 6: Sheets("Products To Be").Range("8599:8622, 8999:9022").EntireRow.Hidden = False
End Select
What I'm ultimately looking to do is add another case that does the same as the above, but make it much more specific; so if O22 = 1 & O23 = 1, hide X rows.
To elaborate a slight bit more from another angle, I've just gone through and added a function in column A for each of my rows that utilises IF, And, and OR statements, that looks at my two data validation cells and either returns a 0 or a 1 in column A, and if Data Validation cell 1 has a value, it returns a 1 for everything, and if both Data validation A and B have values, it only returns a 1 to those rows that meet the data validation requirement of Data Validation B, and then it hides everything with a 0.
Bookmarks