DATA Step, Macro, Functions and more

Add excel data to existing SAS dataset

Accepted Solution Solved
Reply
Contributor
Posts: 35
Accepted Solution

Add excel data to existing SAS dataset

Hi,

 

I have a SAS data set which has data for "estimated population count" for 33 counties "Fipscode:county fipscode, 2-digit numeric"variable, years 1990-2016. I have to add a variable named ALAND10 (from excel) which has a land area for each of the fipscode county variable in SAS (33 counties). 

Later I need to calculate population density from the land area and population estimates. I've attached a SAS data and excel clip.

 

Thanks

 

 

 


Accepted Solutions
Solution
‎07-18-2016 05:19 PM
Super User
Posts: 10,466

Re: Add excel data to existing SAS dataset

First step would be import the Excel data into SAS.

The Merge (datastep) or Join (Proc Sql based on the value of the Fips code.

Either datastep or Proc Sql solution would allow doing the calculation in the same step.

View solution in original post


All Replies
Respected Advisor
Posts: 4,641

Re: Add excel data to existing SAS dataset

What have you tried so far?

PG
Solution
‎07-18-2016 05:19 PM
Super User
Posts: 10,466

Re: Add excel data to existing SAS dataset

First step would be import the Excel data into SAS.

The Merge (datastep) or Join (Proc Sql based on the value of the Fips code.

Either datastep or Proc Sql solution would allow doing the calculation in the same step.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 234 views
  • 1 like
  • 3 in conversation