morinia
asked on
Accessing a spreadsheet by column instead of name after importing from Excel
Experts,
I was wondering if there is a way to access a column in Excel by column (i.e. Column A) in lieu of the column heading in SAS. This would allow flexibility of bypassing column headings which may be long or descriptive in Excel but not good for a SAS variable name.
I was wondering if there is a way to access a column in Excel by column (i.e. Column A) in lieu of the column heading in SAS. This would allow flexibility of bypassing column headings which may be long or descriptive in Excel but not good for a SAS variable name.
ASKER
ckluka,
I would like to reference the column in SAS.
I would like to reference the column in SAS.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://office.microsoft.com/en-gb/excel-help/indirect-HP005209139.aspx
You can address a cell (B3) for example two ways:
=indirect(B3,TRUE)
=indirect(R3C2,FALSE)
You can replace "B3" or "R3C2" with a string literal or cell reference so you can use it in a formula or function to iterate through a list or entire column.