I am making an excel sheet where I have multiple tables with different values, and each table has a list of items, differing each one from another. The problem is that I use multiple tables, therefore I cant use the method =ROWS($A$1:A1), because sometimes the starting index will be in another cell, get me?
If someone can help me it would be really nice!
Thanks!
Example of what I have
Sounds like you want to add row numbering which you can do using structured referencing.
You can use formula
=ROW(Table1[#]) -ROW(Table1[[#Headers],[columnName]])
Adjust Table name and columnName for where inserting.
Related
I'm trying to find the code for the best match in a table using 4 lookup values.
In the image below the left table A to E is a static table and is the reference table
The right table normally on a separate sheet has multiple lines of varying data, where I need to find the correct code based matching the Name, Age and Age Calc from, using the information in the reference table.
I have tried VLOOKUP and INDEX/MATCH, but I'm struggling with the multiple lookup values.
The answers I need in J are: 5678, 7654, 4679, 7654, 1234.
What would be my best method of achieving my code results?
You can do this with a SUMIFS:
=SUMIFS(E:E,A:A,G2,B:B,"<="&H2,C:C,">="&H2,D:D,I2)
Assuming there can be only one match, then do something like:
=SUMIFS($E$2:$E$6,$A$2:$A$6,G2,$B$2:$B$6,"<="&H2,$C$2:$C$6,">="&H2,$D$2:$D$6,I2)
This is the formula that worked for me.
=INDEX(E:E,AGGREGATE(15,6,ROW(E$2:E$6)/(A$2:A$6=G2)/(B$2:B$6<=H2)/(C$2:C$6>=H2)/(D$2:D$6=I2),1))
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 am new to using Excel formulas.
I have an Excel with alot of formulas like
=IFERROR(VLOOKUP(B9,Data[[#All],[Field Location]:[On Production Date]],4,0),"")
I understand IFERROR function and VLOOKUP function.
What makes trouble understanding is table array in VLOOKUP function which is
Data[[#All],[Field Location]:[On Production Date]]
What this table array represents and how can I create something like this?
These are structured references. You can read more at:
Using structured references with Excel tables
Structured references make it much easier and more intuitive to work
with table data when you are using formulas that reference a table–
either portions of a table or the entire table. They are especially
useful because table data ranges often change, and the cell references
for structured references adjust automatically. This minimizes the
need to rewrite formulas as rows and columns are added and deleted in
a table, or when external data is refreshed.
Data[[#All],[Field Location]:[On Production Date]]
is the equivalent of giving a range. $Field Location2:$On Production Date1000, ($A2:$B1000)
assuming there are 1000 rows in your table. Writing the formula in this way will automatically include any new rows added to your Data table.
Data[[#Header],[Field Location]] is equivalent to $Field Location1. Or $A$1.
In Excel, you can give names to certain ranges. Just mark an area, and then on the top left (below the menu), you can enter a name in a drop-down-box.
This name can then subsequently be used in referencing the range, like it is shown in your formula.
This is more intuitive than writing A2:G98, and even more, when you insert new rows into the range, then they will automatically be included.
As seen below, I have an excel file where collections from debtors is recorded.
Column A is the staff code who made the collection..
Column B is the date of collection
Rest is self explanatory
Out of this table, on a different sheet, I need to extract data from this table and populate a new table with the filtered data. E.g., On the second sheet, I need a table to show collections from only P102, of which I have managed to do with the below array formula:
{=INDEX(Sheet2!$A:$A,SMALL(IF(Sheet2!$A:$A="P102",ROW(INDIRECT("1:"&COUNTA(Sheet2!A:A)))),ROWS(Sheet2!$A$2:$A2)))}
Of course this code outputs only the Personnel code but I've ammended this to show for other columns too..
The thing I can't manage to do is, I also need to apply a second filter with the date.. Eg. Only those records from P101 and only in February..
I would really appreciate any feedback on this...
P.S. I do not wish to use Macros and No, I can't make a pivot table...
Regards,
Kemal
Personally I'd approach it using an array formula with logical conditional multipliers. Very similar to SUMIFS.
Here's the output I understand you require:
Here'e the array function (shift + ctrl + enter) I've used placed in cells G2:G5:
={SUM(IF(Table1[Personel]=E2,1,0)*IF("2014"&VLOOKUP(F2,{"Jan",1;"Feb",2;"Mar",3;"Apr",4;"May",5;"Jun",6;"Jul",7;"Aug",8;"Sep",9;"Oct",10;"Nov",11;"Dec",12},2,0)=TEXT(Table1[Date],"yyyym"),1,0)*Table1[Cash])}
Please indicate if there is anything further outstanding.
Kind regards,
James