View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
JLatham JLatham is offline
external usenet poster
 
Posts: 3,365
Default merge & centre - tricky Q

I believe you're going to need some VBA code to accomplish this. Probably as
a routine to be run automatically when the sheet is selected or when the
controlling data changes.

You're also going to be better off NOT using merge and center, instead
you'll want to use the coding equivalent of entering the text to be displayed
into the left most cell of the group and then selecting the group of cells on
the row and aligning them as if you'd used [Center Across Selection] from the
Format | Cells | Alignment | Horizontal Alignment choices in the Excel menu.
Trust me, any coding that has to be done in that area later will go much
smoother this way than by using Merge and Center.

"KRK" wrote:

Hello,

This, I suspect, is a tricky question.

I want to merge & centre a piece of text across a number of columns. I know
how to do this, but...........

I want to select the columns 'dynamically' , ie controlled by data elsewhere
in the spreadsheet. The 'first' column and the 'last' column change
according to numbers elsewhere in the spreadsheet. The number of columns
varies, as does the start column. (sorry if I have over - described the
problem)

Is this possible ?

I'm not asking for a definitive solution at this stage, just some pointers &
ideas please?

Thanks

KK