Moving Columns

  • Thread starter Thread starter gminor7
  • Start date Start date
G

gminor7

I have a 7 column 2000 row spread sheet.

with these headings

Date
Group
Type
In
OUT
PLace
First


Its basically a map of when things are coming in and out of a specific
place. Things are sorted by Group and then by date. So the dates
repeat themselves as you get to another group. What I would like to do
is when I get to a new group I want to move it to the right of the
current columns with the same date.


so there would be a date column on the left. then to the right of it
group
..type...in..out...place...first...group...type...in...out..place..first
and so on and so on.

So it will lay out from left to right acording to group.

I know I should be doing this in a database but the boss likes excell
so here I am.

Any Ideas would be most apreceative.

Thanks
 
Gminor7,

What you appear to want is
Col A Date
Col B GroupA Type
Col C GroupA In
Col D GroupA OUT
Col E GroupA Place
Col F GroupA First
Col G GroupB Type
Col H GroupB In
Col I GroupB OUT
Col J GroupB Place
Col K GroupB First
Etc.,etc.

Are In and Out mutually exclusive ( so you can't have something coming in
and out at the same time)?
If so, you could cut these down to one column in each group headed
"Direction" and the entry would be either In or Out.

I would sort your data by Date first and Group second.
To move the data to the required columns requires a macro or a lot of cut
and paste.
You'll then have to remove the dates that have no entries against them and
re-sort on date only.
Your data would end up like this

Row 3
Col A 11/9/03
Col B Dogs (GroupA)
Col C In (GroupA)
Col D Here (GroupA)
Col E Second (GroupA)
Col F Cats (GroupB)
Col G OUT (GroupB)
Col H There (GroupB)
Col I Last (GroupB)
Col J (GroupC)
Col K (GroupC)
Col L (GroupC)
Col M (GroupC)

On 11/9/03 Group A had dogs in to here second, Group B had cats out of there
last and Group C had no movements either in or out.
If a group has more than one movement in a day, you'll need more than 1 row
for that day to store the data.


Sorry for the loooong explanation

HTH
Henry
 
Thanks for the reply! In and Out are actually time fields so I can't
combine them. I was going to build a loop to move them over but I'm
not sure how get it into the apropriate column. I'm going to work on
the code and paste here in a bit.
 
Back
Top