Genesis 40:12-Genesis 50:26
When Joseph revealed himself to his brothers, he tried to reassure them that they did not send him away but God sent him ahead to preserve life.
"Now therefore be not grieved, nor angry with yourselves, that ye sold me hither: for God did send me before you to preserve life." Genesis 45:5
Joseph said that it was God again in verse 7:
"And God sent me before you to preserve you a posterity in the earth, and to save your lives by a great deliverance."
Then Joseph says it again in verse 8, that really, it was God and not them that sent him.
"So now it was not you that sent me hither, but God: and he hath made me a father to Pharaoh, and lord of all his house, and a ruler throughout all the land of Egypt."
Joseph's brothers never were completely free from their guilt because after the death of Jacob their father the brother's feared Joseph in what he may do to them now that their father was dead.
Joseph says it a final time, really it was God.
"But as for you, ye thought evil against me; but God meant it unto good, to bring to pass, as it is this day, to save much people alive." Genesis 50:20
I have learned it is difficult to take ugly, hurtful things that happen in our lives and see how God can use them to produce good. But God does.
"And we know that all things work together for good to them that love God, to them who are the called according to his purpose." Romans 8:28