If you are on 4.0 or above version then select the table -> Right Click -> Format Table -> General tab. Here you will find many options to hide the rows and columns. At the end there is an option to hide based on the formula too. Not sure if you are looking for this option.
If you could provide some examples then it will help us understand the exact problem.