• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA to move data cells to up and Blank cells stay after data in multiple table.

Hi vletm,
I asked ... what do really need to move?
I have told so many times, but ok I will tell you again, that I want to move non-empty ("Data Cells") to Up side of Table and Blank Cells after non-empty Cells; without deleting any row or Cell. Move data from Columns B, C, D, E, F, H, K & L only in Tables.

it seems to be different than Your I want only.
Can you please little elaborate that what difference you seems in my want and code in post #20.

Thank You.
 
Yeah sure, Please find attached sample excel. Added Code and deleted "Total" Word from all Tables.Thanks.
According to your post #25 attachment the sort works as expected, the range to be sorted just needs to not include the 'Total' row …​
So I can't figure why you want the slowest inefficient way instead of the direct efficient fast way like in post #4 !​
 

CemHyur

You answered again something that You want
... but You need to sort those rows as in Your sample files shows.
Why do You want to do this harder way?

You also has written that i Don't want to disturb Column J.
... then that effect could be something same as in #20 reply's snapshot.
... after something (run code) those J-column values would stay as those red columns.
Do Your sample file show that too?
 
Can you modify this to work faster?
As again your attachments do not reflect your explanation so back to posts #12 & 13 !​
Or just change the columns order : all columns to be sorted first and the others at the end​
in order you can use the direct efficient fast obvious Excel way …​
 
Hi Vletm,

after something (run code) those J-column values would stay as those red columns.
But in red columns, formula also get change...That 3rd row of column G taking subtract value from 2nd row as in you pic...

Please can you share excel? on which you had tried this. I will check.
 
Hi Marc L,

Actually yesterday (in excitement) I had made changes in table; after post #20, that added serial numbers in table's 1st row in column A. So now table is from A:L and in 1st row of Column A of table have serial No. (Like 1 for table1, 2 to table2, 3 to table3) And other rows of Column A will be blank in each table.

I'll share new excel also afterwards.

just change the columns order : all columns to be sorted first and the others at the end
Ok, if I change column J to end of the table (then It'll be Column L) and Column A Data (Serial No) to starting of the table, then can I use Sorting vba code to sort from Column B to Column K only? Is it possible? (Just asking)
If possible then only I change table structure again.
 

CemHyur

I wrote about J-column in #29 reply.
Seems that You've an idea to change Your table in #32 reply.
What would be Your point that You don't want to sort whole table?
... Why do You uses table? ... You could use ranges and then You could sort separately each column.
 
If possible then only I change table structure again.
No sense …​
If you want to use the easy efficient fast obvious way just fix the columns order definitively​
- the sort range must just contain the columns to sort -​
or keep on with your actual way …​
 
Back
Top