Yes! I prefer shredded coconut in this magic bar recipe because it results in a chewier bar, but both will work. Just make sure that whatever you use is sweetened!