It turns out that granulated sugar can be used as a substitute for powdered sugar in a pinch. However, it's not a 1:1 substitution, so don't go thinking you can just swap them out willy-nilly. You'll need to use about 1 3/4 to 2 times the amount of granulated sugar as you would powdered sugar, and you'll also need to adjust the liquid content of your recipe accordingly.
Now, you might be wondering why this is the case. Well, it's all about the particle size of the sugar. Powdered sugar is, well, powder-like, with super-fine particles that dissolve easily and quickly. Granulated sugar, on the other hand, has larger particles that take longer to dissolve. This means that if you use granulated sugar as a substitute, you'll need to give it a little extra TLC to get it to dissolve properly.