I am trying to make a data entry Excel sheet and have a drop down column with a unique ID. In order to make data entry faster, I'd like the largest number (and most recent) to appear at the top of the list.
This is the formula for the drop down lookup
=OFFSET(Surveys!$S$1,1,0,COUNTA(Surveys!$B:$B)-1,1)
and currently returns this as an example
621378 on 05/09/2010 at 06:51 by JJ
Thanks
You can do it without VBA. Look at this article on making a sorted list using array formulae. So make a sorted list in Survey!C:C and reference it in your offset.
Short of writing a VBA code (and I'm not sure how one would do that), I don't think this is possible with Microsoft Excel.
Related
I need convert a sheet I built in google sheets to Excel 2016 since my team does not know google sheets. I wrote a formula to check multiple columns and then build a new array from any data in the selected columns. I understand filter is not available in Excel 2016 but unfortunately upgrading is not a viable option for the whole organization.
The formula I need help converting is
=sort({iferror(FILTER('3)ReAllocation Holdings'!$D$3:$E,'3)ReAllocation Holdings'!$D$3:$D<>""),{"",""});
iferror(FILTER('3)ReAllocation Holdings'!$F$3:$G,'3)ReAllocation Holdings'!$F$3:$F<>""),{"",""});
iferror(FILTER('3)ReAllocation Holdings'!$H$3:$I,'3)ReAllocation Holdings'!$H$3:$H<>""),{"",""});
iferror(FILTER('3)ReAllocation Holdings'!$J$3:$K,'3)ReAllocation Holdings'!$J$3:$J<>""),{"",""});
iferror(FILTER('3)ReAllocation Holdings'!$L$3:$M,'3)ReAllocation Holdings'!$L$3:$L<>""),{"",""});
iferror(FILTER('3)ReAllocation Holdings'!$N$3:$O,'3)ReAllocation Holdings'!$N$3:$N<>""),{"",""});
iferror(FILTER('3)ReAllocation Holdings'!$P$3:$Q,'3)ReAllocation Holdings'!$P$3:$P<>""),{"",""});
iferror(FILTER('3)ReAllocation Holdings'!$R$3:$S,'3)ReAllocation Holdings'!$R$3:$R<>""),{"",""})
},1,0)
The filters checked all 8 columns for data and returned all data in the 8 columns and the column next to it. Then I was sorting the data since I was using an array litteral each column had to provide some data, so the iferror was providing blank,blank if the column was empty and then the sort put those to the bottom.
Any help would be greatly appreciated. I don't really know excel but I know google sheets really well so I'm open to any level of complexity for a solution.
I managed to get a similar thing as the stacking filter using AGGREGATE it will list all data if the left column contains a value:
(Enter with ctrl+shift+enter, copied down and one cell to the right)
=IFERROR(INDEX(D$1:D$5,AGGREGATE(15,6,ROW($D$1:$D$5)/($D$1:$D$5<>""),ROW($A1))),
IFERROR(INDEX(F$1:F$5,AGGREGATE(15,6,ROW($F$1:$F$5)/($F$1:$F$5<>""),ROW($A1)-COUNTA($D$1:$D$5))),
IFERROR(INDEX(H$1:H$5,AGGREGATE(15,6,ROW($H$1:$H$5)/($H$1:$H$5<>""),ROW($A1)-COUNTA($D$1:$D$5,$F$1:$F$5))),
IFERROR(INDEX(J$1:J$5,AGGREGATE(15,6,ROW($J$1:$J$5)/($J$1:$J$5<>""),ROW($A1)-COUNTA($D$1:$D$5,$F$1:$F$5,$H$1:$H$5))),
IFERROR(INDEX(L$1:L$5,AGGREGATE(15,6,ROW($L$1:$L$5)/($L$1:$L$5<>""),ROW($A1)-COUNTA($D$1:$D$5,$F$1:$F$5,$H$1:$H$5,$J$1:$J$5))),
"")))))
I built it up to column L:L, but from there on you get the idea how the formula repeats and the COUNTA-range is stacked.
Also the row numbers need to be adjusted to your needs.
It does not have the SORT functionality, but I believe the reason you sort is to get empty lines your array creates sorted to the back? Anyway. If you want to get the outcome sorted it's better to use these as helper cells and use INDEX/AGGREGATE on the row number from small to large.
My table has a date column to to the left (Column A). Other columns have share quantities and values. Using standard VLOOKUP, I can retrieve values for a given date.
However: I have new transactions, which regularly need to be added to the master table. What I need is an "inverse" function, that allows me to append (or even over-write) data to the underlying table.
So far, my searches for an "inverse" function only give me alternate ways to retrieve (with the columns out of order). Any suggestions for an appropriate method?
If I understand you correctly, what you are looking for is a script that can add data to the end of a table, or change data on an existing cell. Functions only work by reading data in other parts of the spreadsheet and outputting the result in the cell that they were written in. I don't think you're going to find a formula that sends data to another part of the spreadsheet.
If a script is what you're after let me know. I use scripts like that so I can code a few code snippets.
Please check INDEX MATCH functions.
I'm convinced this has to be something very straightforward - I just couldn't find any stack exchange posts referencing it. I apologize if it's already out there.
I'm trying to filter out a couple of numbers from a long list that I have in an excel table. Something similar to an 'in' clause in SQL, but I'm not using a formula - just trying to use the table functionality in Excel 2010. Any help appreciated on how to input multiple numbers/id's at once.
The closest I've found so far is using advanced filters as suggested here - but it's not quite as simple as keying something into the search bar:
https://superuser.com/questions/623380/excel-filter-a-column-by-more-than-two-values
Thanks
The short answer is no, not really. Within Excel, you can filter with two conditions (via an or), but to my knowledge you can't do more than two.
If you are interested in a hack, here is one.
Create a second table with a list of values you want to filter. Make sure it's a table, not a range, for scalability
Create a new field in your original table, and vlookup your value against the new table. Something like this:
.
=IF(ISNA(VLOOKUP([#UID],NewTable[[#All],[FilterItems]],1,FALSE)),"","Y")
Now your original table will have a field you can filter on "Y" to get items in your list.
And because you made it a table, not a range, if you add items, the vlookup will dynamically scale to include those new items, without you having to do the cursed A:A range.
Home Tab > Highlight Column of values > Sort & Filter button > Filter > and from the excel sheet you can filter it by number from the top of the column of values.
I have a very long list in excel. I'm trying to de-dupe without re-organising the list. I have done a lot of de-duping before and I would normally just organise the list and use the below simple IF statement:
=IF(A2=A1,"DUPLICATE FOUND","no dupe")
However I have a list with 15,000 rows of data and I need to see if any two rows contain the same data:
=(IF(A2=(A1:A15000),"DUPLICATE FOUND","no dupe"))
So my question is what the heeby jeebies is wrong with my second statement?
Thanks
COUNTIF can be used with unsorted lists
=IF(COUNTIF($A$1:$A$15000,A1)>1,"DUPLICATE FOUND","no dupe")
Also, if you don't want to use a helper column, then excel has a 'Highlight Duplicates' conditional formatting:
Use Advanced filter with copy to a new location and Unique values only - or Remove Duplicates.
A2=(A1:A15000) will only test for A2=A1.
Is there a quick/easy way to filter all unique items in an Excel 2013 column similar to the Google Docs "Unique" function?
This is not a pretty answer, but it works.
Paste this as an array formula into cell B2:
=LOOKUP(2, 1/((COUNTIF(B$1:B1, A:A)=0)*(A:A<>"")), A:A)
With the column that needs to be filtered in A:A
Then drag / copy it down as far as is required.
See it online in Google Spreadsheets
Caveats:
Does not retain original order (resulting order is in fact the reverse)
Does not automatically expand to cover all cells
Not fast, not pretty, not transparent
Footnotes:
It is trivial to use IFERROR() to filter out the #N/A errors, but I've not done this to keep the answer concise
In the same vein the header of the column A is currently also returned. This can be fixed by changing A:A to A$2:$25 in all 3 locations
Original question was for Excel 2013, all of this should work there, but I wrote and tested it in Excel 2016
I would love to hear suggestions on how to make the formula automatically expand down as far as required.
Use the Unique records only feature in Advanced Filter.
Under the DATA tab there is this: "Remove Duplicates". It'll do what you want.
There isn't an equivalent to =unique() in Excel, and I hate having to work without it.
Without =unique() trying to find all of the unique values in a large array of data is impossible. Take a dozen columns of a hundred+ entries and see what the unique values are across the whole mess and pop them nicely into a new columns. I can't figure out how to do it in Excel, but in Gdocs it's simple:
=unique(transpose(split(ArrayFormula(concatenate(A:M&",")),",")))
Using Filters, or PivotTables, or whatever, just doesn't cut it, and I haven't been able to find any hacked together ridiculous excel formula to do anything similar.
filter your data in spreadsheets
This might prove to be of some help to you.