I'm probably wrong, but for you to be able to take the Spanish citizenship after a year of legal residency (which btw is almost impossible to obtain) your grandfather should have been both a Spanish citizen and born in Spain. I think your grandfather was probably a Spanish citizen, but he wasn't born in Spain. So this rule doesn't apply to you. If none of your parents or grandparents was born in Spain it is almost impossible for you to automatically get Spanish citizenship.