Did you really look them up in a dictionary? Was "great/nice" the only translation you could find? They are almost never interchangeable.
立派 refers to only certain types of good-ness. What is considered 立派 is objectively determined by culture to a large degree.
- socially admirable; ethically praiseworthy; honorable; noble; of high social status; respectable
- strong-looking; sturdy; handsome
素敵 is more subjective and it vaguely means "cool", "nice", "attractive", "appealing", etc.
For example, 立派な服 typically refers to something like tuxedos and military uniforms, whereas 素敵な服 refers to any cool-looking outfit. 立派な仕事 refers to a steady and respectable job, but 素敵な仕事 is just "attractive job" in whatever sense. 立派な死 refers to "honorable death", but 素敵な死 makes almost no sense. 立派な口ひげ is used to refer to an objectively well-manicured, handsome mustache, whereas 素敵な口ひげ is used when you are subjectively attracted.