Delete blank columns.

  • Thread starter Thread starter John
  • Start date Start date
J

John

how to (forumla or macro) delete only the empty columns in A:A, but if any
text in A10 or A18 not empty then need to keep it, after the empty box
deleted the column B need to move to A
 
Have you tried using Data | Filter | AutoFilter
This lets you select varies values.

Or try Edit | GoTo | Special and specify blank cells

Not clear what you want to happen to B entries.
best wishes
 
John

A:A is one column so you can't delete empty columns in a column.

What exactly do you want to do?

Delete blank rows in column A?

How does column B fit into this?


Gord Dibben MS Excel MVP
 
Hi Guys.
this is the sample that I got:
A B C D
------------------------------------------------------------
row john 158 258
2 mike 125 236
3 ted 258 235
4 may 258 2358
5 joy 268 258
6 mary 258 269

how to move column B to A and keep the row#4,6 no change, I can do it manu
but I need is formula or macro for many joys.
 
Select the B entries; copy
Move to A1 and use Paste
If you turn on Macro Record (Tools | Macros | Record Macro) before you do
this, then you will make a macro that will do it for you next time.
best wishes
 
Hi Bernard,
that will del all information in column A, I just want to move the rows
1,2,3,5 to column A. then looks like all nam are in the column A and number
in column B. that why I need a formula or macro to do it.
 
Insert a new A column (we will get rid of it later)
Enter 1,2,3 in A1, A2, A3; select these and pull down to last row giving
1,2,3,4,5.... 999 or whatever is last row)
Sort all the data (A1:B999 or whatever is last row) by column B (the old
column A) Now all blanks are at the top
Do the Cut and Paste only on the row with blank in B
Sort again by column A to restore old order
Delete Column A

All of this can be recorded in a macro
best wishes
 
Do you want columns C and D to move left also?

Select column A and F5>Special>Blanks>OK

Edit>Delete>Shift cells left.


Gord
 

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