Hi, I've created a form in excel that requires certain rows to be hidden or visible based on cell value and I've no clue how I can build out a code to do this. I wish I understood them more.........
Frustratingly I had created the form in Microsoft Forms but it isn't suitable as only allows one user to complete the form whereas mine will probably need input from several team members and needs to be fluid.
I'm hoping a code to auto hide or make rows visible will make it more user friendly.
This is what I need to achieve if anyone out there can help at all?
Beginning
If cell K26 is "Yes" or blank, then rows 27:106 need to be hidden. If "No" then rows 27:35 need to be visible and rows 36:106 hidden.
If cell K35 is "Yes", then rows 37:44 need to be visible with rows 36 and 45:106 hidden, if "no" then rows 36 needs to be visible with 37:106 hidden
If cell K36 is "Yes" then rows 37:67 and rows 82:106 need to be hidden. If "no" then rows 37:106 hidden
If cell K43 is "Yes", then rows 45:51 need to be visible with rows 44 and 53:106 hidden, if "no" then rows 44 needs to be visible with 45:106 hidden
If cell K44 is "Yes" then rows 45:67 and rows 82:106 need to be hidden. If "no" then rows 45:106 hidden
If cell K51 is "Yes", then rows 53:59 need to be visible with rows 52 and 61:106 hidden, if "no" then rows 52 needs to be visible with 53:106 hidden
If cell K52 is "Yes" then rows 53:67 and rows 82:106 need to be hidden. If "no" then rows 53:106 hidden
If cell K59 is "Yes", then rows 61:67 need to be visible with rows 60 and 69:106 hidden, if "no" then rows 60 needs to be visible with 61:106 hidden
If cell K60 is "Yes" then rows 61:67 and rows 82:106 need to be hidden. If "no" then rows 61:106 hidden
If cell K67 is "Yes", then rows 68:80 need to be visible with rows 81:106 hidden, if "no" rows 68:106 hidden
If cell K80 is "Yes", then rows 81:93 need to be visible with rows 94:106 hidden, if "no" rows 81:106 hidden
If cell K93 is "Yes", then rows 94:106 need to be visible, if "no" rows 94:106 hidden
End
I'm not sure if it would be easier to group the rows which make up the sections into tables? But there's still the anomaly of where K44 will only show if K43 is "no" I don't know how that would work as a table.
If anyone can help me I'll be eternally grateful - thank you.
Frustratingly I had created the form in Microsoft Forms but it isn't suitable as only allows one user to complete the form whereas mine will probably need input from several team members and needs to be fluid.
I'm hoping a code to auto hide or make rows visible will make it more user friendly.
This is what I need to achieve if anyone out there can help at all?
Beginning
If cell K26 is "Yes" or blank, then rows 27:106 need to be hidden. If "No" then rows 27:35 need to be visible and rows 36:106 hidden.
If cell K35 is "Yes", then rows 37:44 need to be visible with rows 36 and 45:106 hidden, if "no" then rows 36 needs to be visible with 37:106 hidden
If cell K36 is "Yes" then rows 37:67 and rows 82:106 need to be hidden. If "no" then rows 37:106 hidden
If cell K43 is "Yes", then rows 45:51 need to be visible with rows 44 and 53:106 hidden, if "no" then rows 44 needs to be visible with 45:106 hidden
If cell K44 is "Yes" then rows 45:67 and rows 82:106 need to be hidden. If "no" then rows 45:106 hidden
If cell K51 is "Yes", then rows 53:59 need to be visible with rows 52 and 61:106 hidden, if "no" then rows 52 needs to be visible with 53:106 hidden
If cell K52 is "Yes" then rows 53:67 and rows 82:106 need to be hidden. If "no" then rows 53:106 hidden
If cell K59 is "Yes", then rows 61:67 need to be visible with rows 60 and 69:106 hidden, if "no" then rows 60 needs to be visible with 61:106 hidden
If cell K60 is "Yes" then rows 61:67 and rows 82:106 need to be hidden. If "no" then rows 61:106 hidden
If cell K67 is "Yes", then rows 68:80 need to be visible with rows 81:106 hidden, if "no" rows 68:106 hidden
If cell K80 is "Yes", then rows 81:93 need to be visible with rows 94:106 hidden, if "no" rows 81:106 hidden
If cell K93 is "Yes", then rows 94:106 need to be visible, if "no" rows 94:106 hidden
End
I'm not sure if it would be easier to group the rows which make up the sections into tables? But there's still the anomaly of where K44 will only show if K43 is "no" I don't know how that would work as a table.
If anyone can help me I'll be eternally grateful - thank you.