Hi all,
I attached an example dataset similar to what I have and what I want. Someone will be sending me data, so I want to make it as easy as possible to process without having to manually go in and change dates, etc.
I'll have a written out 'action' and then each state (the example dataset just has a few states). Then there will be two sets of dates.
What I want to do is create a daily dataset starting at some date that I specify and have each state listed for each date (I learned how to do just this part yesterday) to a specified end date. What I'm not sure how to do is then go through each state and say if it's between date1 and date2 then list out 1 (or whatever the action value should be) and if it's not between those dates, then make it a 0. I have this shown in my example 'want' dataset in the spreadsheet (where 0=no action, 1=walk, 2=run, 3=sit).
I can't think of how to do this with macros to output everything and not overwrite each state as I want a complete dataset. I'm not sure how often I'll be getting an updated spreadsheet to run through, so anything to make updating it easiest is best.
Thanks!
... View more