Group:  Microsoft Excel ยป microsoft.public.excel
Thread: Excel Macro

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Excel Macro
RLC 28.09.2006 17:46:02
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?
Re: Excel Macro
"Otto Moehrbach" <ottokmnop[ at ]comcast.net> 29.09.2006 01:18:39
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
"RLC" <Rick[ at ]discussions.microsoft.com> wrote in message
news:1052F3A7-EFB0-4579-9493-D4DF3F1ABCCE[ at ]microsoft.com...
[Quoted Text]
>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?


Re: Excel Macro
"Don Guillett" <dguillett1[ at ]austin.rr.com> 29.09.2006 12:32:19
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

--
Don Guillett
SalesAid Software
dguillett1[ at ]austin.rr.com
"Otto Moehrbach" <ottokmnop[ at ]comcast.net> wrote in message
news:Om%23%23zU24GHA.512[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text]
> 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
> "RLC" <Rick[ at ]discussions.microsoft.com> wrote in message
> news:1052F3A7-EFB0-4579-9493-D4DF3F1ABCCE[ at ]microsoft.com...
>>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?
>
>


Re: Excel Macro
Rick 29.09.2006 15:52:02
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.

--
Rick


"Otto Moehrbach" wrote:

[Quoted Text]
> 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
> "RLC" <Rick[ at ]discussions.microsoft.com> wrote in message
> news:1052F3A7-EFB0-4579-9493-D4DF3F1ABCCE[ at ]microsoft.com...
> >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?
>
>
>
Re: Excel Macro
"Otto Moehrbach" <ottokmnop[ at ]comcast.net> 30.09.2006 20:00:39
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
"Rick" <Rick[ at ]discussions.microsoft.com> wrote in message
news:8235E271-4432-443A-ADDF-87A502074DFE[ at ]microsoft.com...
[Quoted Text]
> 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.
>
> --
> Rick
>
>
> "Otto Moehrbach" wrote:
>
>> 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
>> "RLC" <Rick[ at ]discussions.microsoft.com> wrote in message
>> news:1052F3A7-EFB0-4579-9493-D4DF3F1ABCCE[ at ]microsoft.com...
>> >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?
>>
>>
>>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net