Sorry for the late reply - been a little tied up making changes to CelebDAQ.
In a word yes - you need to have them in your portfolio AND they need to have made a gain in the week for you to get a payment.
The dividends are paid on based on what you HAVE in your portfolio and not what you HAD in your portfolio. If you choose to sell shares in a celeb you will be sacrificing any potential dividend if you do this. The dividend is a reward for you holding onto the shares long term (ok a week isn't THAT long but still). If you get rid of them prior to the the payout then you won't get anything.
We could possibly code CelebDAQ differently but it's fairly complex as it is and we need to keep things as simple and fun as possible whilst at the same time trying to add some sort of "realism" to the process (very loosly at that).