SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
MILKYLOVE
Calcite | Level 5

Hello all,

 

I have a problem. I have a column address where I have to put blank the rows that contain ONLY numeric variables. Example: the ones that I have highlighted 

 

MILKYLOVE_0-1668506381641.png

 

Any idea how I can proceed? 

I cannot use compress because it will remove all other numeric characters from rows that contain both numeric and alphabetical 

 

1 ACCEPTED SOLUTION

Accepted Solutions
andreas_lds
Jade | Level 19

Try:

if anyalpha(var) = 0 then var = ' ';

View solution in original post

2 REPLIES 2
andreas_lds
Jade | Level 19

Try:

if anyalpha(var) = 0 then var = ' ';
MILKYLOVE
Calcite | Level 5

Thank you !! It works 🙂

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 655 views
  • 0 likes
  • 2 in conversation