View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Macro - Help Please Excel 2003

Okay, I'm still not completely sure of what you want (but I think I'm
close<g). As I understand it, you have "common companies" which can appear
on multiple worksheets and it is the row for these companies that you want
moved; you want each worksheet treated independently from the rest (that is,
only the data for the common companies on a sheet should be moved on *that*
sheet); and the data being moved on each sheet should start on the third row
beneath the last row of data on that sheet and the row of data that are move
will appear one under the next with *no* intervening empty rows between
them. Is that correct? If so, is there a list of these "common companies"
somewhere (listed in a column on one of your sheets somewhere that can be
referenced in code or, perhaps, just a listing that can be hard-coded in the
macro directly)?

--
Rick (MVP - Excel)


"Paul" <Not_ wrote in message
...
Rick - thank you for the quick response and apolog
ies that my initial information was misleading

Spreadsheet with various worksheets represnting different countries - the
data is not consistent in so much as one worksheet may contain 200 rows
and
another only 60.

There are common Companies in each worksheet : ie UPS World Wide 1 - UPS
World Wide 2 - TNT Global 1 - TNT Global 2 and so on.
On each of these sheets I would like to iremove these companies from the
rest and cut and paste them into blank rows commencing at 2 rows below the
final entry which would be moveable at each operation - the total rows
for
these Companies and their subs could range from 50 entries to 3 entries

Attempting to use a macro for this using auto filter and copying and then
deleting the visible rows causes errors as the data ranges are not
consistent
and you end up with overlapping rows so you cannot delete.

What I was looking for is for something like an if function to identify
the
next blank row + 2 and then paste the data and then delete those
duplicates
from the original data - the next stage would then be the manual process
to
create a total beneath each group

I hope you can help

Thanks

Paul


"Rick Rothstein" wrote:

A little more detail about what you want to do might be helpful. For your
existing data... can a company take up more than one row? If so, would
those
rows be consecutive or could they be scattered all about? If scattered
all
about, did you want them all placed together, one after the other? Where
on
the same sheet did you want the companies moved to... in rows after the
currently existing last row? If so, is that where you want them to
remain?
Or would you want them moved up? Also, exactly what did you mean by "cut
it
and paste it into a blank row + 2"? Did you want the current information
that is currently on a single row split up onto 3 rows somehow? If so,
how
did you want them split? Or did you mean you wanted the single row to
remain
a single row, but to have two blank rows separating it from the next
company's data?

--
Rick (MVP - Excel)


"Paul" <Not_
wrote in message
...
Hi

I am hoping that somebody may be able to help with this

I am trying to semi automate a worksheet to cut and paste Company
account
information within the same spreadsheet

For example one of the worksheets may have 60 rows I need to select
Company
A - cut it and paste it into a blank row + 2 then go on to to select
Company
B and perform the same operation. The entire spreadsheet has about 50
or
so
worksheets - getting this sorted out would save me a lot of time

Any help would be much appreciated


Thank you