I'm trying to filter an excel which contains merged cells. My data is laid out similar to the example below.
I found a similar answered question here. The answer to this question works well for my spreadsheet initially, however the spreadsheet I'm applying this to is a live document. If a new row is added later, this new row isn't recognised by the filter. The images below hopefully explain what I mean.
Filtering category 2:
Adding extra row:
Filtering after extra row is added - new row doesn't appear:
I believe this happens because when a new row is inserted, the category cell (in my example cell A6) is blank, rather than containing a value. When I unmerge the cells in column A I get this (A6 is blank):
I also tried copying an existing row and inserting it, hoping this would fill in the blank cell, but it had the same result.
Is there any more robust way of achieving a filter on the merged cells, which will accept new rows being added? I know a simple alternative would be to leave column A unmerged, however with the size of the spreadsheet this would look very messy. This spreadsheet is used by quite a few people and mostly edited using Excel online (on MS Teams) so macros aren't a desirable solution either. Any help would be greatly appreciated.
Try the following:
Select your unmerged range, click Home > Find & Select > Go To Special. In the Go To Special dialog box, select Blanks and click OK.
All blanks from your range are now selected and if you press Arrow Up one time followed by ctrl + enter
All the blank cels will now contain the value from the cell above.
I believe that solves your problem without VBA.
Related
I've got several databases containing 100/1,000's of rows where the information is presented something like this:
I need to get all the information relevant to each company onto one row; I'm not able to do a simple Sort & Filter as nearly every company has a different level of detail, so information ends up in the wrong rows. Looks like the best option is an Index/Match formula, but my current formula
=INDEX(Sheet1!B:B,MATCH(Sheet2!$A2,Sheet1!$A:$A,0)
returns zeros for any result where the first Index/Match result is blank:
How can I write the formula so that it skips the blank cells? I'd prefer not to have to use VBA however any advice would be very much appreciated.
Alternatively,
Because match is always the return the first value it found.
So in cell G2,
=INDEX(Sheet1!G:G,MATCH(Sheet2!$A2,Sheet1!$A:$A,0)+COUNTA($G$1:G$1)-1)
Or by matching the header to offset the cells.
You can just wrap your existing formula in an IF function:
=IF(Sheet2!$A2<>"",INDEX(Sheet1!B:B,MATCH(Sheet2!$A2,Sheet1!$A:$A,0),"")
I will normally use a "Go To Special" function for this.
Say for example for the sample data below.
I will put in the first formula '=IF(B2<>"",C3,"")'. Copy that cell (Ctrl+C), then select cells from C2 to C7 and use the 'Go to special' to select Blank cells only under Home tab, in Editing > Find & Select > Go To Special. Simply just Paste the formula to all the blank cells by Ctrl+V. You will get all the information in one row on the first row for each companies.
Hope this helps.
Step1:
Create a pivot table with your data and in the pivot options select 0 for the blank cells.Copy all the fields into row area...
Step2:
Apply conditional formatting as shown in the below image to remove (blank) cells.
Note: This is not a robust solution but worked for me.
I'd like to fill every other row in an excel worksheet with the value that is following that row.
See example.
Is there a way to accomplish this?
I am sorry if this is an extremely easy task, but I just can't get my head around how this may work, since just plain copying the data, filtering for blank rows and pasting it into the filtered table just doesn't work as I want it to.
Thanks in advance.
Edit: It might be worth adding that I cannot at all change rows or columns in the excel sheet since it is connected to a database which configuration does not allow this.
Add a new helper column with the formula =ISEVEN(ROW()).
Filter this column on TRUE.
Select the range from A2 to the bottom-right of the cells that you want to populate, and input =A3 [Ctrl-Enter].
Clear the filter and delete the helper column.
Well, I have found something weird and I'm kind of shocked right now.
I have several Excel Files and normally we use tables to store the data (tables I mean ListObjects) and we apply Conditional Formating rules, so when a new row is inserted into the table, the conditional formating rule expands instantly:
If I insert a new row in this table, my conditional formatting rule instantlly applies to new row.
As you can see in the second image, a new row has been inserted and it becomes red instantlt because our conditional formating rules. This works perfect.
Now I have another file with different information, but it's the same idea. Table, data and conditional formating.
Data is just a list of invoices (sorry, but I had to remove the Vat Numbers and Company names for privacy). Column C is a VLOOKUP formula, combined with an IFERROR. It searches the name of the company (company name is in column D) and if something is found, it returns the Vat Number. IF not, it returns value No encontrado. The formula works perfectly.
Now, I have created a conditional formating rule that, if value in column C is No encontrado it highlights in yellow all cells in row. This rule works perfect too. We have used it thousand of times.
Now comes the weird part. If I insert a new row and subtotals row is not active in the table, my conditional formating rule instantlt applies to new row. And that's perfect!
As you can see in the image above, the new row is yellow because the formula can't find anything because company cell is in blank. This is perfect and works good.
Now comes the weird part and I have no idea how to get a solution. If we insert a new row but subtotals row of table is active then, the conditional formating rule does not applies to new row!
As you can see in the image above, last row shows value No encontrado but the conditional formating rule is not applying. So I have to manually update area of application of conditional formating rule.
Let's go back to first file I showed in the first 2 images of this question. If you check the second image, subtotals row is active, but conditional formating rule updates area of application.
So my question is. Why in this second file, my rule of conditional formating is not updating area of application if I insert a new row with subtotals row active?
Things I know are not the problem:
Both files are xlsx, so no macros or VBA are affecting.
Both files have been created with same version of Excel and same PC.
Things I have tried:
Creating the file again starting from zero. It did not solve anything.
Thanks in advance. If you need more information, please, feel free to ask.
UPDATE: Well, I've done some research and discovered something. It looks like Data Validation Lists blocks Conditional Formating autoexpand. In Columnd D (company name), I've created a Data Validation Dropdown List. Users choose the company. This Data validation blocks Conditional Formating from updating area of application. If I disable the data validation in that column, then the CF rule works perfect, even with subtotals row active.
Any idea of how to deal with this bug? I know I can fix it with VBA but I'm trying to find a solution without VBA. I would like the file to be XLSX. Also, In this company they never update software, so solution must work for Excel 2007.
UPDATE #2: My CF rule just checks if in column C appears the value No encontrado. If found, it highlights in yellow all cells in that row of the table:
The formula I'm using is: =IF($C11="No encontrado";TRUE;FALSE)
This CF rule applies to all the table (right now is range =$A$11:$K$609
And the formula in column C is:
=IFERROR(VLOOKUP([PROVEEDOR];T_PROVEEDORES;2;FALSE);"No encontrado"). It searches for value in cell D in another table called T_PROVEEDORES. IF nothing is found, then it returns No encontrado.
In column D is just a Dropdown List with different company names.
Also, in Column D I got a Data Validation Dropdown List of companies.
Thanks in advance.
UPDATE #3: I've uploaded a sample file to my GD. I deleted all privacy information and used generic names.
Download file
In the sample file, worksheet COMPRAS, there is a table. If you insert a new row using TAB key and subtotals row is not active, the new row will be highlighted in yellow, and that's how it should work.
But if you do the same with subtotals row active, then it does now work. CF rule does not update area of application.
Good news and bad news.
Bad news is, this is actually an issue in Excel 2007 that was fixed in later versions.
Good news is there is an answer, just not the cleanest. Make the range of your conditional formatting include the entire worksheet:
The problem is the conditional formatting range doesn't continue to expand with new rows. If the range is set in this fashion, it forces Excel to set your formatting as the range includes all possible rows. My example just shows the yellow row. Repeat what i have done for the other three conditions as well.
I've looked around but haven't been able to find an exact answer to this question without learning everything there is to know about excel formulas.
I'm trying to use one conditional formatting rule to highlight one specific cell in each row in a dataset.
I've got that working with this: =AND(D5<>0,D5<=SMALL(IF($D5:$W5<>0,$D5:$W5),1))
The next part is having the formula exclude hidden columns/columns that have the header "USA" for that I have this formula: =SEARCH("US",D3)=1
Which works to highlight the cells with USA written in them.
I need to combine these two formulas to have it highlight the single lowest value in each visible row.
On a separate note I then want the highlighted value displayed at the end of the data set. This way if I update the document with a lower price it will automatically update the rest of the sheet with this information.
I am not sure of your ultimate objective (eg mention of hidden columns/columns that have the header "USA" - is that one condition or two? - and each visible row - is that because part of each row is hidden or are rows hidden as well as columns?) but your immediate requirement seems to be to combine two formulae into one for CF and for that the following may suit, assuming from D5 to Wn is selected first:
=AND(D$3<>"USA",D5<>0,D5<=SMALL(IF($D5:$W5<>0,$D5:$W5),1))
I am receiving an error saying:
Microsoft Excel can't insert new cells because it would push non empty cells off the end of the worksheet.
This happens when I try to insert a new row of data. I need to keep all of the data on the sheet I already have. I only have 56 rows, so I think I should be able to add more...
Excel has a limited number of rows and columns (which varies with version).
To find your last cell with data in it, click on any cell and then press Ctrl+End.
This will then take you to the furthest from A1 which has content. You'll need to remove what is there to add extra rows.
I had the same.
Erased last columns and rows
Selected all cells from last used cell to the bottom, cleared content and cleared formatting and cleared rules.
Did not help immediately, but worked after a save and reopen.
To solve no enough Column scenario:
Unmerge the rows(optional): If you have any entire row get merged, remove them, don't do that. (many people stuck here)
(It may stop you from doing the formatting track)
Select unneeded columns: Select your first empty column(the leftmost one), jump to the end of the sheet using ctrl+shift+end to select all empty columns on the right till the last one.
Clear formatting & content of selected cells: Do not use delete cells feature, as the Excel will re-generate the cells in the same format, that's why it won't work. Use the Clear button on the left of Sort & Filter instead. Use Clear all to clear both formatting and content of the cells, so they can be treat as empty cells afterwards.
For no enough Rows scenario:
It's almost the same. :P
It would do the trick. Hope this may help.
My problem was that the sheet had Freeze Panes enabled. Clearing that cleared the issue.
This happened to me some time ago as well, so when I stumbled across this question I thought I might share my experience.
Approach #1: Deleting rows and columns
As Matt B mentions in his answer, the first thing to try is to delete the columns which are taking up place.
Let us assume that your data uses columns A to T and rows 1 to 20.
First off, select cell U1 and press CTRL+SHIFT+RIGHT to mark all cells from T1 to XFD1 (the right-most column Excel can display). Right-click any cell, choose "Delete" and "Entire column". Now you have gotten rid of the columns.
Next, select cell A21 and press CTRL+SHIFT+DOWN to mark all cells from A21 to A1048576 (the highest row number Excel displays). Right-click any cell, choose "Delete" and "Entire row". This will remove the rows.
Now it should work, as you have gotten rid of all excess columns and row.
Approach #2: using VBA
When I encountered this issue, the above solution did not work for me. However, I eventually found a solution that did work.
Right-click the sheet that is causing problems.
Choose "View Code"
Press CTRL+G to open box "Immediate"
Type in ActiveSheet.UsedRange. This will force Excel to "drop" all cells not currently in use, thus freeing up the space you need to create new columns or rows.
I hope this helps you or any other soul out there desperate to create new rows or columns in Excel.
I selected the last column and then CTRL+SHIFT+RIGHT to select all the cells to the right. And then Clear all (button to the right of Home->Format) to clear both formatting and content of the cells. This was the only solution that then allowed me to perform a column insert.
This happens also when you have in the excel sheet merged all cells in one row (then it is not possible to add another column) or you have merged all cells in one column (then it is not possible to add row).
Removing the merged row/column will enable again adding new columns/rows.
I have the same error.
even i delete the the rest of the rows and columns, still the same.
what i did is just copying the whole thing to a new wheetsheet, then everythings works again....
I had a sheet with data apparently contained in A1:G4000 that gave this error, trying to insert ROWS within that range.
ctrl-end took me to IV65536 !
So I deleted the entire range of ROWS from 4001-65536 (Cells / Delete Sheet Rows in Office 365).
This had no effect and I still couldn't insert ROWS. Repeated three times to make completely sure I'd done it right. No joy and ctrl-end still took me to IV65536 !
Running out of ideas, I deleted COLUMNS H to IV.
ROWS will now insert.
Baffled as to what is going on... but may be worth trying if you get this error.
My only guess is that some invisible whole-column formatting may have been applied that went down to row 65535 and was re-instated after the rows were deleted.
Excel has limitation per version so please make sure you check your file extension, example:
XLS for excel 97-2003
XLSX for more recent 2007, 2013, 2016
Sometimes, we forget to check this even you use Excel 2016, the alert still see.
This would remind you to check first.
I had the same problem and tried everything suggested above. Nothing worked. But I did the following, which fixed the problem immediately:
Unmerged two columns: The two were merged purely for esthetic reasons, so unmerging them had no substantive effect on my data and it worked like a charm.
This might mean that you have to look through your worksheet to find the offending column/row, but it's worth it.
Good luck!
1) Click Control+shift+Right-Arrow button and select and copy your entire data
2) select all columns(A 1 to XFD 1) and delete and copy your data now in deleted column sheet it will work now.
I had this issue as well, I was able to resolve by selecting unused columns and "clear all". Do not delete the columns after clearing. Otherwise, the formatting would reappear and you would still see the same error.