Hi
Guys in below excel sheet i have text data in column B so in that i want mobile number
its highlighted by red color for your understanding
proc import datafile='c:\temp\New Microsoft Office Excel Worksheet (3).xlsx' out=have dbms=xlsx replace;
run;
data want;
set have;
phone_number=scan(___VIT_AP_University_campus__Ina,-2,',');
run;
Most of us will not or cannot download Excel files (or any files).
Please provide your data according to these instructions: https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/
@BrahmanandaRao wrote:
Data like that only
Then many of us can't help you. (But, yes you can, by putting in a little effort, turn your data into the format requested, and then we can help you)
So put in a little effort and change it to a SAS data set and give it to us following the instructions. Then we can show you how to use SAS to extract the phone number.
proc import datafile='c:\temp\New Microsoft Office Excel Worksheet (3).xlsx' out=have dbms=xlsx replace;
run;
data want;
set have;
phone_number=scan(___VIT_AP_University_campus__Ina,-2,',');
run;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.