ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Delete blank columns. (https://www.excelbanter.com/excel-discussion-misc-queries/167717-delete-blank-columns.html)

John

Delete blank columns.
 
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

Bernard Liengme

Delete blank columns.
 
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
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"John" wrote in message
...
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




Gord Dibben

Delete blank columns.
 
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

On Wed, 28 Nov 2007 11:54:03 -0800, John wrote:

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



John

Delete blank columns.
 
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.


"Gord Dibben" wrote:

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

On Wed, 28 Nov 2007 11:54:03 -0800, John wrote:

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




Bernard Liengme

Delete blank columns.
 
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
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"John" wrote in message
...
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.


"Gord Dibben" wrote:

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

On Wed, 28 Nov 2007 11:54:03 -0800, John
wrote:

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






John

Delete blank columns.
 
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.


"Bernard Liengme" wrote:

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
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"John" wrote in message
...
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.


"Gord Dibben" wrote:

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

On Wed, 28 Nov 2007 11:54:03 -0800, John
wrote:

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






Bernard Liengme

Delete blank columns.
 
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
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"John" wrote in message
...
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.


"Bernard Liengme" wrote:

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
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"John" wrote in message
...
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.


"Gord Dibben" wrote:

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

On Wed, 28 Nov 2007 11:54:03 -0800, John

wrote:

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








Gord Dibben

Delete blank columns.
 
Do you want columns C and D to move left also?

Select column A and F5SpecialBlanksOK

EditDeleteShift cells left.


Gord

On Thu, 29 Nov 2007 05:10:00 -0800, John wrote:

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.


"Gord Dibben" wrote:

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

On Wed, 28 Nov 2007 11:54:03 -0800, John wrote:

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






All times are GMT +1. The time now is 08:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com