simple LED question

So i have 18 LEDs being controlled with shift registers, but for simplicity sake just think that they`re controlled individually with digital output pins. Now they're all share the same ground so I can use one 100 ohm resistor for example to compensate for every LED can i not?

What I'm saying is that if i have each led with anode at a digital pin and the cathodes all connected together and then a resistor from the cathodes to ground.

My resistors are 1/4 W if that matters. I just dont want to use 18 resistors if i dont have to.

Please don't cross post.