How to merge columns and rows into one cell besides using Merge and Center Icon?

V

valerie

J.E:
Although David McRitchie's page seems to have everything about basic
macros which you have said that this is the only solution to my
question, I have tried the example of recording and running macros on
my question but it doesnt seem to work; the rows and columns did not
merge into one cell.
heres how my question goes;

I have text data value in D1; Super-Com Distribution Pte Ltd, and in
D2; Sales and Stock Half-Yearly Report For 2002. I need to merge the
rows and columns from A1 to J2 into one cell and centralise the data
within. Could you just show me the way of doing it?
I'm be grateful if you could just show me how. Thanks a million.
 
P

Peter Atherton

Valerie

Cut and paste the titles nto column A and then select the
columns and centre accross columns.
You can't centre text if it is not in the first cell.

Regards
Peter
 
T

Tom Ogilvy

select D2
go to the formula bar,
highlight Sales and Stock Half-Yearly Report For 2002
do ctrl+X

select D1
go to the formulabar

now click at the end of the string, hit the space bar, then do Ctrl + V

now select the entire string and do Ctrl+X

now go to A1

go to the formula bar

no do Ctrl+V

now select A1 to J2 and do format=>cells, select the alignment tab and
select merge cells and for horizontal Center.

Vertical is your choice.
 
V

valerie

Tom:
What you suggested to me about the copy and paste thingy to my question
in the subject line seemed to have nothing wrong with it. According to
what you have said, u mentioned pasting all the data in A1. But though
i have said that I wanted to merge rows and columns; A1 to J2 into one
cell which is right, the text value in D1 and D2's position must not be
changed.
Is there any way to avoid changing the text value position in D1 and D2
respectively?
Thanks a lot.
 
T

Tom Ogilvy

the only data that will appear in a merged cell is the data in cell A1.
When you do the merge, other data in the merged range will be lost. So if
you are going to have one merged area of A1 to J2, then the data in D1 and
D2 will be lost.

In fact, when you select Range A1:J2 and do format=>Cells, alignment tab and
click Merge Cells, you will get a prompt that says that you have data in
other cells which will be lost and only data in the upper left cell will be
retained. When you click OK, the data in D1 and D2 will be gone.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top