Basically I have cell O1 as total number of trades

However this is based upon how many rows from 5 onwards are filled in. How can I get the cell O1 to change based on how many columns have been filled in?

Cheers