Remove the existing closet rod or shelving by unscrewing all brackets and mounting hardware with a power screwdriver. Pull out the shelving and brackets. Patch the holes in the wall with drywall compound and a plastic scraper. Let this dry for 12 hours or until it turns white.
Mark the walls in two places with a pencil at 20 inches from the floor, and then every 15 inches up the wall. Adjust this measurement to your own needs if necessary.
Draw a straight line along the back and sides of the walls with a carpenter's level at each mark. Sight the level to ensure the line is straight each time.
Measure the width of the interior of your closet at each line and use a power saw to cut 12-by-1-inch shelving boards and 2-by-1-inch cleat boards to the measurements. Measurements may differ at each mark. Cut two more 10-inch-long cleat boards for each shelf from 2-inch pine boards or whiteboard with a power saw.
Mount the longer cleats to the back wall using the lines as a guide, and the 10-inch cleats to the side walls, lining them up with the longer cleats. Run a stud finder along the wall to find the studs and screw the cleats to the wall at the studs. If no studs are available, drill a hole through the cleat and into the wall with a 3/16-inch drill bit. Remove the board, drill out the hole with a 3/4-inch bit and insert a #10 anchor into the hole. Replace the cleat and screw a #10 screw through the cleat and into the anchor. Repeat this for each shelf.
Place shelf boards on each cleat and screw 2-inch screws down through the shelf boards and into the cleats at the back and on each side to secure the shelves.