marycoleman721 wrote:
Well, I am very grateful for the elaborate fixes, but I must admit the last few were quite over my level of expertise. As Barry so kindly pointed out, I can't even speak the "language of the application".
I'm guessing the easiest way for me to eliminate the blank rows is sort by a column which contains data in all the rows, then delete blank rows, then uncategorize. I thought uncategorize would return the blank rows to their original position.
"Sort" rearranges the rows in order using the contents of one or more columns as the key for the sort. You do have the opportunity to Undo Sort in the Edit menu, but that's not terribly useful in this case as Undo is done step by step in reverse order; as you would have deleted the blank rows
after doing the sort, you would have to Undo that deletion before Undo Sort became available.
Insert Categories (in the Reorganize Dialogue) also involves a Sort (on the same column as used to insert the Categories), and unclicking the InsertCategories checkbox, while it does remove the Category rows, does NOT return the undeleted rows to their original order. 😟
Yvan's suggestion and formula takes care of that problem by using a formula places a number in the cells of the rightmost column of all rows which contain any data in the columns before that cell.
It use a supplementary column located at the right edge of the table.
its first standard cell contains the formula :
=IF(COUNTA(OFFSET($A$1,ROW()-1,0,1,COLUMN()-1))>0,ROW(),"")
Fill down
With that, we may sort upon this column.
The blank rows will be gathered at bottom but the ordering of other ones will not be changed.
COUNTA(OFFSET($A$1,ROW()-1,0,1,COLUMN()-1))>0
This part of the formula counts the number of cells in the row containing data, and compares the count with zero.
-If the count is greater than zero, the next part of the formula is used.
ROW()
This part places the row number into the cell containing the formula. Because row numbers increase as we move down the spreadsheet, these row numbers are already in ascending order, and an ascending sort on that column will not change the order of these rows. After the Sort, the formulas will be recalculated, and the numbers (but not their order) will change.
-If the count is zero (ie. All cells in the row to the left of the formula contain no date, then the last part of the formula is used.
""
This part places the empty string ( "" ) into the cell containing the formula.
Text values (including the empty string) sort after numerical values, so an ascending sort on the column will place these rows together at the bottom of the table.
As written, Yvan's formula assumes that ALL cells in the 'empty' row, including cells in header columns, are empty. If that's not the case, and you want to consider only the 'standard' cells in determining whether a row is empty, you'll need to make two changes to the OFFSET part of the formula.
OFFSET($A$1,ROW()-1,0_*,1,COLUMN()-*_1)
The underlined zero is the column offset (from cell A1) where the count starts. Change this number to the number of header columns in your table.
The underlined one is an adjustment to the number of columns in the range of cells counted. Change that number to one more than the number of header columns in your table.
The rest of the discussion between Jerry and Yvan is regarding possible substitute formulas for the one above. While there may be advantages to one or more of these, you can safely ignore the discussion and use Yvan's first suggestion (with the modifications suggested here if there's a need to eliminate header column cells from the count). After all, you won't be stripping blank rrows from your table every day.
On that note, I'd suggest that after deleting the empty rows you take one further step:
Either delete the new column that was added to contain the formula,
OR delete the formula from all rows except the first standard cell in the column.
Either step will remove the formula from Numbers's calculation load each time and value on the table is changed. The second will keep a single copy of the formula which you can fill down the column should you need to repeat the exercise in the future.
Barry, I have 5 header columns and 5 header rows, and the only formula I use is "Sum", however I use this formula on 70 columns and 3,921 rows. Of the 3,921 rows, approximately 1/3 of them are blank, and I'd love to remove them to shorten my scrolling. But you are right, Numbers is being very sluggish. I exported this table to Excel to see if it was also sluggish, and it is not. I like working with Numbers better. All my other work is in Numbers, and I'd like to keep things together.
As mentioned earlier, Numbers is sluggish with large tables, and for Numbers, a 4000 row table (with over a quarter million calculations) qualifies as "large". Deleting the blank rows should speed things up somewhat.
The reason I asked about header rows and header columns was that I had noted a recent post stating that
multiple header columns also slowed Numbers. The link will take you to that thread (and message).
Regards,
Barry