How to apply auto fill based on selection