View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Text Alighnment Across Selection

You could merge the cells but that can cause many problems.

Would it help to move all the data into A10 then leave B10:Z10 blank?

Function ConCatRange(CellBlock As Range) As String
Dim Cell As Range
Dim sbuf As String
For Each Cell In CellBlock
If Len(Cell.text) 0 Then sbuf = sbuf & Cell.text & " "
Next
ConCatRange = Left(sbuf, Len(sbuf) - 1)
End Function

=ConCatRange(A1:Z10) entered A11

Copy and paste values to A10.........delete B10:Z10


Gord Dibben MS Excel MVP

On Thu, 17 Jul 2008 21:39:43 -0500, Minitman
wrote:

Greetings,

I have an alignment problem across several cells. For this question
let's say the area is A10 to Z10. Let's name the area "TestArea1".

When I highlight "TestArea1" and go to the format menu and choose the
Alignment tab, the only choice that does anything is "Center Across
Selection". This will not work in this situation! I need the text to
start on the left side of "TestArea1", not the center.

This can be done by merging the cells in "TextArea1", which is
something that I am trying to avoid, if I possible.

Anyone have any ideas as to how this can be done?

Any help will be appreciated.

-Minitman