Eliminate Blank Columns

ionelz

Board Regular
Joined
Jan 14, 2018
Messages
248
Office Version
  1. 365
Platform
  1. Windows
I need a Formula at AE to eliminate blank columns
At AE should B W, at AF should be Z and at AG should be AC
It is more complicated that shown, I can have 2 empty columns, or 5 empty columns ....
1708529717786.png
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Do you want them deleted or do you want them not showing up in another section of your workbook a result of an array formula or function?
To delete them. Assuming there are no blank cells in a column you want to keep.
Select the rage in this case W1:AC8,
Press F5
Click Special
Click Checkbox for blank cells
Click OK
Then from ribbon click cells, delete columns.

For formula or filter, use the choosecolsI() columns function
in your example =Choosecols(W1:AC8,1,4,7)
 
Upvote 0
Solution
Thank you !
I would be nice if formula will wind the Column number
 
Upvote 0
You're welcome.
I'm guessing you were interested in the 2nd suggestion.
Try this (this is only looking for blank column headers).

And it makes extra rows that are blank in the array output:

Book2
WXYZAAABAC
1423
2222
3222
4322
5444
6342
7
8
9423
10222
11222
12322
13444
14342
15
16
Sheet5
Cell Formulas
RangeFormula
W9:Y16W9=LET(clmns,(W1:AC1<>"")*(SEQUENCE(1,COLUMNS(W1:AC1))),select,CHOOSECOLS(W1:AC8,FILTER(clmns,clmns>0,"")),IF(select="","",select))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,151
Messages
6,123,316
Members
449,094
Latest member
Chestertim

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top