Remove blank cell of rows and shift the rest to left

mehrana

New Member
Joined
Aug 1, 2024
Messages
19
Office Version
  1. 365
Platform
  1. Windows
I have a table with 60+ columns. More data is periodically added (using Microsoft form) to this table. There are / will be many blank cells in each row (80% of the entire cells). Instead of this very wide table, I need to display only the data on a screen without the blank cells. The screen can of any kind, such as another table with the blank cells removed and data cells are shifted to left. It will be great if this can done automatically each time when a new row is added or more data is added to cells (on left side of the existing).

I appreciate any help you can provide.
 
It will update automatically every time the table changes.
That will be great.

I'm a kind of beginner, tried adding the formula a few times, not sure exactly to make it work. Any reference you can possibly provide?
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
From your screenshot I asume that you data is in a table.

For the formula to work you need to replace "Table1" with the name of your table.

Excel Formula:
=LET(t, Table1,
tj, BYROW(t, LAMBDA(x, TEXTJOIN("|", 1, x)&"|")),
res, DROP(REDUCE("", tj, LAMBDA(arr,new, VSTACK(arr, TEXTSPLIT(new, "|")))), 1),
IFERROR(res, "")
)

If you are not sure what the name of the table is you could look in the Name Manager or you could select any cell in the table and go to the menu "Table Design" an look for the Table Name
1722616256564.png


Let me know if i can help you further.
 
Upvote 0
From your screenshot I asume that you data is in a table.

For the formula to work you need to replace "Table1" with the name of your table.

Excel Formula:
=LET(t, Table1,
tj, BYROW(t, LAMBDA(x, TEXTJOIN("|", 1, x)&"|")),
res, DROP(REDUCE("", tj, LAMBDA(arr,new, VSTACK(arr, TEXTSPLIT(new, "|")))), 1),
IFERROR(res, "")
)

If you are not sure what the name of the table is you could look in the Name Manager or you could select any cell in the table and go to the menu "Table Design" an look for the Table Name View attachment 114892

Let me know if i can help you further.
Thank you for the hints. I updated your formula with the table's name and added to a new sheet. It is working amazing! the same way I needed.
There is only one thing, it converts the data-time date from table like "8/2/2024 1:14:32 PM' to "45506.5517592593". Any idea?
 
Upvote 0
It is still the same data, it is just formated differently.
if you format the data to date time you should see it correctly.
You could use a conditional formating rule to format it automatically. If you need help with that let me know.
 
Upvote 0
or use the format painter to copy the format from te original data to the new columns.
 
Upvote 0
or use the format painter to copy the format from te original data to the new columns.
I update the format of new sheet to date/time the same as the sheet1. The format only works correctly outside of the defined region. it does not apply to the column inside.
Format painter sounds like the solution. How can I apply/add that to the formula?
 
Upvote 0
I update the format of new sheet to date/time the same as the sheet1. The format only works correctly outside of the defined region. it does not apply to the column inside.
Format painter sounds like the solution. How can I apply/add that to the formula?
I used Format painter regularly. It only transferred the background color, did not change the data format
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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