Hi ,
I am createing format by using attached excel sheet , but i am getting below error.
Error: For Format VISIT_FMT , this range is repeated, or values overlap: .-..;
proc format cntlin=in_excel_ds;run;
Thank you,
Rajasekhar.
EDIT: Tested and confirmed - you have duplicates - find and remove those - use PROC SORT.
You also need to tell SAS it's a character format - TYPE=C. Add that into the data set and it works fine.
79 80 proc format cntlin=Sorted; NOTE: Format $VISIT_FMT is already on the library WORK.FORMATS. NOTE: Format $VISIT_FMT has been output. 80 ! run;
From browsing the XLSX file in this forum you appear to have two different formats in that same XLSX file that are both trying to use the same NAME. Notice how you have two **OTHER** start values?
The first one is probably a character format and the second one looks like a numeric format. So either add a FMTTYPE variable or add the $ to the front of the name of the character format. Or do both.
You probably do not want both a START and an END for a CHARACTER format. Ranges of character values are messier for text with varying lengths. And it looks like you also don't need them for the numeric format. I did not notice any cases in scanning the file where END is different than START. So just drop END and avoid the risk of it accidentally being different and causing a range of values instead of a single value.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.