If we clicked well enough, age wouldn't matter too much. I'd prefer he be my age or older than myself. But I probably wouldn't marry someone much more than 10 or 12 years older. Cause I'd want to spend more time with him. I wouldn't want to outlive the guy I loved by too many years.
Friendship-wise, I tend to be drawn toward people who prize wisdom over ambition (and who are maybe a little rebellious too, hehe). This makes age less important to me. Though it's nice to have friends who get your generational references too of course.