I have an outlet that power comes into from breaker and the outlet wires to other outlets and goes to a switch that i would like to run a light fixture from the switch, i already ran cable to the ceiling box to the switch. in the switch box there is a black and white and ground. And in the outlet box has black and white wire on top outlet and same on bottom outlet with the bottom black wire going to a group of black wires that run another outlet and has a single white wire that comes from the breaker.
Kinda speculating here since you haven't gotten back with us. But it sounds like the switch is currently a switch loop, and white is one of the hots. We're gonna change all that. And there are a total of 3 cables going to the receptacle: this switch loop, supply, and onward power to another receptacle.
Ok, so all ground wires get joined everywhere we go. All grounds are pigtailed, not using a device as a splice. Every switch and receptacle gets a pigtail and that gets added to the ground bundle. Probably already that way. And hook up the grounds first.
In the switch, tie both white wires together with a wire nut and push them into the back of the box. The two blacks remaining (including your new one) go to the 2 terminals on the switch.
Pull out the receptacle and notice how there are tabs between the screws that can be broken off. It'll be broken off on the side with the brass screws (the hot). Put a black pigtail on each brass screw. Put a white pigtail on one of the silver screws.
In the receptacle box, the changes you made cause a happy coincidence, now all the wire colors in this box actually match. All blacks are always-hot, and all whites are now neutral. Join all the white wires with a wirenut. Join all the black wires with a wirenut.
And you're done.