2 Corinthians 1:6

And if we are troubled, it is for your consolation and salvation, being worked out in the endurance of the same sufferings which we also suffer; if we are comforted, it is for your consolation and salvation.

2 Timothy 2:10

Therefore I endure all things for the sake of the elect, that they may also obtain the salvation which is in Christ Jesus with eternal glory.

Acts 21:5

But when it was time to finish the days, going out, we traveled on. And they with all the women and children went with us as far as outside the city. And we kneeled down on the shore and prayed.

Romans 5:3-5

And not only this, but we glory in afflictions also, knowing that afflictions work out patience,

Romans 8:28

And we know that all things work together for good to those who love God, to those who are called according to His purpose.

1 Corinthians 3:21-23

Therefore let no one glory in men. For all things are yours,

2 Corinthians 1:4

He comforting us in all our trouble, so that we may be able to comfort those who are in every trouble, through the comfort with which we ourselves are comforted by God.

2 Corinthians 4:15-18

For all things are for your sake, so that the superabounding grace might be made to abound through the thanksgiving of the greater number, to the glory of God.

2 Corinthians 5:5

And He who has worked in us for this same thing is God, who also is giving to us the earnest of the Spirit.

2 Corinthians 12:15

And I will very gladly spend and be spent for your souls, even if loving you more and more, I am loved the less.

Ephesians 3:13

For this reason I desire that you faint not at my tribulations for you, which is your glory.

Philippians 1:19

For I know that this shall turn to my salvation through your prayer and the supply of the Spirit of Jesus Christ,

Hebrews 12:10-11

For truly they chastened us for a few days according to their own pleasure, but He for our profit, that we might be partakers of His holiness.

Treasury of Scripture Knowledge

Summary

And whether we be afflicted, it is for your consolation and salvation, which is effectual in the enduring of the same sufferings which we also suffer: or whether we be comforted, it is for your consolation and salvation.

It is

General references

Bible References

Whether

2 Corinthians 1:4
He comforting us in all our trouble, so that we may be able to comfort those who are in every trouble, through the comfort with which we ourselves are comforted by God.
2 Corinthians 4:15
For all things are for your sake, so that the superabounding grace might be made to abound through the thanksgiving of the greater number, to the glory of God.
1 Corinthians 3:21
Therefore let no one glory in men. For all things are yours,
2 Timothy 2:10
Therefore I endure all things for the sake of the elect, that they may also obtain the salvation which is in Christ Jesus with eternal glory.

It is

Acts 21:5
But when it was time to finish the days, going out, we traveled on. And they with all the women and children went with us as far as outside the city. And we kneeled down on the shore and prayed.

Effectual

2 Corinthians 4:17
For the lightness of our present affliction works out for us a far more excellent eternal weight of glory,
2 Corinthians 5:5
And He who has worked in us for this same thing is God, who also is giving to us the earnest of the Spirit.
Romans 5:3
And not only this, but we glory in afflictions also, knowing that afflictions work out patience,
Romans 8:28
And we know that all things work together for good to those who love God, to those who are called according to His purpose.
Philippians 1:19
For I know that this shall turn to my salvation through your prayer and the supply of the Spirit of Jesus Christ,
Hebrews 12:10
For truly they chastened us for a few days according to their own pleasure, but He for our profit, that we might be partakers of His holiness.

General references

Matthew 5:4
Blessed are they that mourn! For they shall be comforted.