Lookup and display from all Sheets - excel

Not sure if this is possible but here it goes:
I have a suppliers spreadsheet, I constantly add supplied products we use for the supplier, each supplier has its own sheet and I constantly add more so there is no set amount of sheets. Most products have a category. what I would like is a dropdown list on the first sheet where you select for example 'card' then it will show the full row where ever, in any sheet, the category paper is found.
I need the row to load as it will contain stuff like price, width etc etc.
I have attached a basic layout of what I have, as you can see on the sheet 'Category Lookup', this is where I want to select card for example, and then any information will display on that page.
Is this possible? I hope i explained it well enough.
My Sample Excel File

It is possible, I will not build the whole solution for you because it takes time.
Build a formula with concatenate parts of the formula including the sheet names (a list of sheet names in a column where you manually add the name of a sheet when you add a new supplier)
Formula could be in this style:
=VSTACK(FILTER('Supplier 1'!A6:N7;'Supplier 1'!G6:G7=B1);FILTER('Supplier 2'!A6:N9;'Supplier 2'!G6:G9=B1))
For Example the build formula string is in A1
Then create a new name e.g. "MyData"
With the formula =Evaluate(&A&1)
Then go to the cell where you want the data and write
=MyData
The only thing then, you need to add a sheet name to the list, so your formula string is updated.
Maybe helpful links:
https://superuser.com/questions/253353/excel-function-that-evaluates-a-string-as-if-it-were-a-formula
https://www.xelplus.com/lookup-values-across-multiple-worksheets-excel/

Related

Excel Help: Dynamic range + Data Validation

I got a problem with some popular Excel question, dynamic ranges and data validation drop-downs and auto-populate. Lets say I got 2 sheets, and on one sheet I got drop-downs to choose from another sheet, and that is not a problem when I define cells and range using:
=OFFSET($A$19;;;COUNTA('0528 - info'!$E$2))
..but what about when I wanna add some new cells in between,so that they can be automatically recognized in which group they belong:
As you see for instance Column B has some "groups" where you can find more different "values" like in Column C, like Power Supply has MV1 and MV2... and so on. My drop-downs on the sheet 1 are called exactly like this "groups" and I did reference them manually using given function. But is it possible to populate my drop-downs automatically when I add for instance MV3 beneath MV2 in this table? Or RN7 on 14th row? Everytime I add new values I have to extend my dropdowns (what is fine..), but problem will be when I share this table to others, they gonna forget it 90%.
I hope you get my point, any suggest will be fine!
p.s. Indirect doesnt work in a way it should - It gives me all instances from the Column but not specific ones that I need.
=INDIRECT("Table4[VarEDS]")
Well this option gave me again what I already had before - all "matches" from the Column and still not ONLY matches that are for certain group. ...
If your Data Validation source is a "Table" as shown in your image then you can take advantage of "Table Column" Range which is dynamic. That means whenever you refer that column as NAMED range and if make changes to the column (Edit, Add, Delete) it will reflect in the referred cell.
You can use this technique even for ranges not in table. You need to NAME them with offset formula and make dynamic.
You can find dynamic address of your column as shown in the image below. Select entire column WITHOUT Header
Name your column data range with appropriate name as shown in image below
Then in Data Validation Window refer this name using F3 as shown in image below.
Then you can see... Even if you edit, add or delete any row in the column the data validation will change
Editing based on your comment below: If you want text from column B and Column C appear together in the validation dropdown list. Insert column in the table and join text from column B and C and then make data validation based on that column as shown in Colum D in image below
Finally I think I understood your question.
Watch this video
Excel: Find Multiple Matches & Dependent Drop Down List
After some days of searching and trying I got what I wanted - wasnt wasy job at all. Needed to combine more functions with the help of couple of videos from Leyla (Xelplus):
https://www.youtube.com/watch?v=gu4xJWAIal8
https://www.youtube.com/watch?v=7fYlWeMQ6L8&t=5s
First step was to make unique list of my values (text in my case) on separate sheet:
=IFERROR(INDEX(t_VarGroup[Vargrouptext];MATCH(0;INDEX(COUNTIF($J$2:J2;t_VarGroup[Vargrouptext]););0));"")
Then I needed to "extract" all the values that are belonging to the certain unique values:
=#IF($I3<COLUMNS($K$2:K$2);"";INDEX(t_EDS[[VarEDS]:[VarEDS]];AGGREGATE(15;3;(t_VarGroup[[Vargrouptext]:[Vargrouptext]]=$J3)/(t_VarGroup[[Vargrouptext]:[Vargrouptext]]=$J3)*(ROW(t_VarGroup[Vargrouptext])-ROW(t_VarGroup[[#Headers];[Vargrouptext]]));COLUMNS($K$2:K$2))))
FUrthermore, I created Unique drop down list:
=OFFSET($J$3;;;COUNTIF($J$3:$J$14;"?*"))
And then dependent drop down list nearby using:
=OFFSET($K$2;MATCH($H$2;$J$3:$J$17;0);;1;COUNTIF(OFFSET($K$2;MATCH($H$2;$J$3:$J$17;0);;1;20);"?*"))
And because I made it on other sheet, I had to reference them to an appropriate sheet name where my main sheet is - with drop downs, it is actually very useful for my future work and for everyone else who has struggling with drop downs but on a bit specific way =))
credits to: #Naresh Bhople for suggestion about Youtube videos.

Change chart according to two drop down lists with data from multiple sheets

Hi i would like to create a dashboard where my charts will change when I filter them by country and months according to their respective drop down lists.
For example: Sorted by 'Australia' and 'Aug'
My charts are linked to the table as shown. For example, one of the data source is O60:P62.
The problem:
For each country, I have different sheet tabs with similar data formats with different values. I would like to know how can I use one master drop down list in my 'Dashboard' sheet and link it to each data source in each sheet when I choose a specific country from the drop down list.
Adding on, the second drop down list for months will follow according for the country selected from the first drop down list. The end result would be my dashboard charts changing according to the country and month selected.
I hope my explanation is clear. Thanks in advance!
For the country, you you have to fill the data on the Dashboard worksheet with the INDIRECT worksheet function to get the data from the worksheet of the selected country.
Just as an example, let's assume the formula in B61 is ='Australia'!B5, then you have to replace this with =INDIRECT("'"&$A$1&"'!"&CELL("address",B5)).
If you then change the contents of A1 either by typing directly or through the drop-down box (e.g. replace Australia with Malaysia), the formula will get the data from the Malaysia worksheet.
And for the month, you can find the data with a simple INDEX(MATCH) combination, or with a HLOOKUP. Instead of typing "Aug" in P60 and P64, you put =$B$1, so it takes the value from the drop down box.

Excel formula to get specific data that according to another column

I have a spreadsheet that contains various sheets, each sheet contains different types of orders including items, descriptions, quantity, etc.
ITEM DESCRIPTION QTY
Apple ... 1
Orange ... 4
I would like to get a formula that is capable to find out the total quantity of items from every sheet.
If you want to do it in a single cell, I'm afraid the only way of doing so without VBA is to make a manual search over all the pages :
= SUMIF(Page1!A:A,"=ItemName",Page1!C:C)+ SUMIF(Page2!A:A,"=ItemName",Page2!C:C)+ ...
Other solutions would involve you creating your own personal vba function or adding new cells in each sheet which I'm not sure are within the realms of possibilities.
If all your sheets with "data" on them are the same format, you can save time and maintenance by doing the following:
create a sheet called start which is before all the "data" sheets. This sheet should be blank (except perhaps for a bit of text saying "this sheet is intentionally blank")
create a sheet called end which is after all the "data" sheets.
Then in your summary sheet, you can do =SUM(start:end!C:C) (I'm assuming your quantity is in column C from your example above).
If you use this approach, you can easily add sheets in between start and end; the formula will not need to be rewritten
Per #l3echod's comment in another answer, you can also use this pattern in SUMIF and SUMIFS formulae, if you want total quantity per item:
=SUMIF(start:end!$A:$A,$A2,start:end!$C:$C)
this assumes the item in question is in cell A2. Note that depending on the volume of data you have, this might be a slow formula to calculate.

Excel adding data based on current data

I'm trying to write a macro that i can run which will allow me to simply sort a range of orders into what i like to call categories.
The basic idea is that we get orders through, and we generally have to print a different type of shipping label for the different items, based on weight, size and value. Unfortunately, there is no easy way of doing this other than going through all orders (sometimes thousands) and copying them into different worksheets to group them into the type of shipping method we need to use.
What i'd like to do (i already have a couple of macros already) - is to look in another sheet whereby we store the item titles, and have a second column within that sheet with a number (1, 2 or 3). For each item, based on it's weight, size or value, which we have already specified - they would be assigned a number. The Macro will look at the item name, if the sales sheet finds a match from column A in the item's sheet, it will then add the correct number specified in the item's sheet to the cell next to the item title in the sales sheet.
Column A-G has all customer details, Column H has the item title. The number i'm wanting to add to the row will be inserted into Column I.
The item's sheet has Column A which is the item title, and Column B is the number assigned to this item.
I have tried to muster a macro up myself, however it's confusing me no end.
This is exactly what vlookup is used for
=VLOOKUP(H1, items!A:B,2,FALSE)
Put this formula into I1 on the sales sheet and drag it down, if the items sheet is not in the same workbook , you will need to modify the reference to point to it,
you could obviously write a macro that will insert this formula and drop it down, but it will still be using vlookup or application.vlookup to get the result
Wildcard searches at the front would be
=VLOOKUP("*"&H1, items!A:B,2,FALSE)
or both ends would be
=VLOOKUP("*"&H1&"*", items!A:B,2,FALSE)
NB* BE CAREFUL WITH THIS AS YOU MAY HAVE ITEMS WITH SIMILAR DESCRIPTIONS
like "apple" and "red apple"
you should always use a product code to do lookups when available

Excel Data Validation List using formula with filtering

I have following workbook:
Worksheet Accounts:
Worksheet Posts:
I would like to know if it is possible to define Data Validation of type List to entire column B in sheet Posts using formula, so that Data Validation popup shows only Account Ids from Accounts sheet which Website column matches Website column of a selected row in Posts sheet and which have value Active in Status column?
In SQL-ish or LINQ-ish words:
SELECT Id FROM Accounts WHERE Website =
#SelectedPostRow.Website AND Status = Active
Marks on the second image shows which values should be shown in a drop-down.
Yes you can do this, but it requires some supporting setup.
First for each of your website options, you need to create a named range for the options that would be in the drop down you are seeking to create.
To do this, just highlight the list of cells and right click, the choose Name a Range
Then you need to create a lookup list for your website names to the named range possiblities
Then in your data validation source use a forumla like this:
=indirect(vlookup(a1,$i$8:$j$13,2,false))
then whala, the dropdown list changes based upon the website value.
Now if you are also needing to automate the named range bits, you could change them to encompass entire columns and then use a pivot table to pull in the data. Would just need
an independant pivot for each website option.
Each time you pulled in fresh data you would need to refresh the pivots, but it would function.
This problem need a bit of a preparation.
In the same sheet, or in another, copy your data (or add the relevant cells)
In column A you have a number that could be ranked.
I obtained it with (cell A2):
=IF(C2=$J$2,1,0)*IF(E2="Active",1,0)*ROW()
In column B rank the number and exclude the unwanted rows (B2):
=IF(A2=0,0,RANK(A2,A:A))
Then you can VLOOKUP in column H, using a enum in column G (manually entered). The formula for H1:
=IFERROR(VLOOKUP(G2,$B$2:$D$9,3,FALSE),"")
Now you could set your validation based on column H
PS: there could be small errors in the formulas as I have translated them from italian and I cannot test in english.

Resources