Automatically set posts to NoIndex depending on category?

1) Go to post categories.

2) Click on ‘edit’ of the target category.

3) Scroll down and there will 2 options to select indexation option of all posts in that category and whether to include in sitemap.

Update as you want and BINGO!