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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.