How do I sum values in column A where values in column B are greater than 1 and less than 30?

Thx