Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2006

Tip: Looking for answers? Try searching our database.

Excel Macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RLC - 28 Sep 2006 18:46 GMT
I have an excel spreadsheet in which I need to sort row with column headings
that are mixed between merged and unmerged cells.  In other words, I have
merged columns for employee name, project number, id and then have additional
columns that have beginning date range and ending date range stacked.  These
last date ranges cannot be merged.
Right now the macro gives an error message of "merged cells must be of
identical sizes".  Any way to work around this?
Otto Moehrbach - 29 Sep 2006 02:18 GMT
The way to work around what you have is to get rid of all merged cells.
What you see in your file is another example of why you should never use the
merge cells feature.  Period.
   You can accomplish the same appearance in your file by other means.  Do
this:  Open a new blank file.  In A1 enter something.  Anything.  Now select
A1:H1.  Now click on Format - Cells - Alignment tab.  In the "Horizontal:"
space click on the down-arrow and click on "Center across selection".  Done.
HTH  Otto
>I have an excel spreadsheet in which I need to sort row with column
>headings
[quoted text clipped - 6 lines]
> Right now the macro gives an error message of "merged cells must be of
> identical sizes".  Any way to work around this?
Don Guillett - 29 Sep 2006 13:32 GMT
Sub CENTERACROSS()'toggles in personal.xls assigned to menu button
   With Selection
       If .HorizontalAlignment = xlCenterAcrossSelection Then
           .HorizontalAlignment = xlGeneral
       Else
           Selection.HorizontalAlignment = xlCenterAcrossSelection
       End If
   End With
End Sub

Sub CenterAcrossA()
Selection.HorizontalAlignment = xlCenterAcrossSelection
End Sub

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

> The way to work around what you have is to get rid of all merged cells.
> What you see in your file is another example of why you should never use
[quoted text clipped - 14 lines]
>> Right now the macro gives an error message of "merged cells must be of
>> identical sizes".  Any way to work around this?
Rick - 29 Sep 2006 16:52 GMT
Thanks Otto, however my explanation probably wasn't clear enough as the
center across doesn't work.  here is an example portion of the spreadsheet:

Employee   ID   Project     9/1   9/8   9/15
                                     9/7  9/14  9/21
Joe Smith  777  ABCDE      20    24    30
Mary Doe  888   xyzrr        16    12    10

I can't sort this without losing the date range that I need to keep in tact.

Signature

Rick

> The way to work around what you have is to get rid of all merged cells.
> What you see in your file is another example of why you should never use the
[quoted text clipped - 14 lines]
> > Right now the macro gives an error message of "merged cells must be of
> > identical sizes".  Any way to work around this?
Otto Moehrbach - 30 Sep 2006 21:00 GMT
Rick
   It's not clear in your post what's in what row/column.  I understand the
Employee, ID, and Project and the entries under that, but I don't understand
where all the dates and numbers go.  Where does all that go and exactly what
cells are merged and what cells aren't merged.  Be specific, like cell A5
has this, cell B5 has that, etc.  Then tell us by what column you are trying
to sort.  Tell us what is sorting properly and what is not.  HTH  Otto
> Thanks Otto, however my explanation probably wasn't clear enough as the
> center across doesn't work.  here is an example portion of the
[quoted text clipped - 32 lines]
>> > Right now the macro gives an error message of "merged cells must be of
>> > identical sizes".  Any way to work around this?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.