data format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a excel sheet with data from cell A1 to Z700. How can I write all data in the 1st column? (column B under A, column C under B etc,etc).
 
Columns(1).Delete

--
Regards,
Tom Ogilvy

nektarios said:
I have a excel sheet with data from cell A1 to Z700. How can I write all
data in the 1st column? (column B under A, column C under B etc,etc).
 
i= 1 'adresses rows in column A
j=2 ' adresses Column B,C etc .
k=1 ' adresses row column B,C etc.

'where is the last entry in column A?
do until isempty( cells(i,1).value )
i=i+1
loop
i=i+1


for j= 2 to HowManycolumnsToCopy
do
'copy Content to Column A
cells(i,1).value = cells(k,j).value
'the next cell
k=k+1
' and of course advance the row pointer of Column A
i = i+1
'as long there is content in the Cell
loop until isempty( cells(k,j).value
'having finished the columnX advance Column pointer
j= j+1
next
 

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

Back
Top