I need some help on exporting a data set to excel.
My data looks like this;
date colour total
02/01/2016 blue 2
02/01/2016 yellow 5
In my excel workbook, my report will be using vlookups to determine the number of blue vs. yellow on Feb.1st. Therefore, I will be making a concatenated field of the date & colour. I would like to make this concatenated field the first column (column A) in my data sheet and don't want to have to create the column daily. How do I export the above 3 columns by skipping column A on my data sheet? I would like to replace everything in the data sheet daily with the exception of column A.
I have figured it out. I concatenated the 2 fields. Prior to concatenating I added 21916 to the date field. Excel could then read the date.
A couple of thoughts:
I tried to concatenate the 2 fields in sas but it concatenates differently than in excel because of the date.
Please post what you want as your concatenated column and also what you have tried in SAS.
As @SASKiwi mentioned, why do it in Excel at all, SAS is designed to do statistics? If you have to use Excel, why use SAS? You seem to be using things just because they are there.
As for this concatenating columns, that doesn't sound like a good idea to me. If you do it in SAS you can use group by <var1>,<var2>, or by group processing. If using Excel then there are other functions available, countif() is one that jumps to mind. Check what you need to do, and why, then decide what software is better suited to the purpose.
I have figured it out. I concatenated the 2 fields. Prior to concatenating I added 21916 to the date field. Excel could then read the date.
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.