Using Excel to Identify Entries that Add to a Specific Value - excel

I have a large list of numbers and would like to identify the different combinations that add up to another certain amount. I have tried installing the solver add in but for some reason it won't appear in the Data tab.
Any other way to do this?

Eva: There's some code at http://dailydoseofexcel.com/archives/2005/10/27/which-numbers-sum-to-target/ that should be enough to get you started.

Related

Dynamically extract a list of unique items from multiple sources in Excel

I am trying to make a list in Excel that has as its output a list of unique items that appear multiple times in different sources of the excel sheet. Ideally, the list should be automated automatically as more data is inputted in the sources, but no additional sources will be added. I used a formula I found here, but it only works for a single source of data (and this data then needs to be adjacent).
I attached a picture of my document with circles enclosing the sources and pointing to where the list should be created. I highlighted in yellow a cell in the top row that does not get outputted (because I don't know how to do this). Picture for reference
I can provide the excel document if need be.
I am thinking of consolidating the sources to a single source, but I would like to solve this in a more sophisticated way that does not involve creating more tables.
As per your screenshot it seems you are using tables. Then try below formula-
=IFERROR(INDEX(FILTERXML("<t><s>"&TEXTJOIN("</s><s>",TRUE,Table1[Machine],Table2[Machine])&"</s></t>","//s[not(preceding::*=.)]"),ROW(1:1)),"")
Please note: TEXTJOIN() is available to Excel-2019 & Excel-365 and it has limitation to 50,000 data only.
To learn more about FILTERXML() read this article from JvdV.

Is there a way to add data validation to a column without knowing the specific number of rows?

I am pretty new to openpyxl and spreadsheet generation in general, so sorry in advance if this is a dumb question.
At my work, we use a spreadsheet generator that generates a full spreadsheet based on a JSON schema. We want that spreadsheet to be filled later by other people, to transform it back to JSON and make it flow through our system.
We have some fields that are enums, with a limited option of accepted values determined within the JSON schema. We currently accept free text to be filled in, and later it gets validated and throws an error if the free text is not one of the options.
We were thinking about adding data validation to the spreadsheet, but one of the problems that arose was that we don't know how many rows will the person with the spreadsheet fill. So, the question is: Is there any way to specify that only certain values are allowed for a specific column without specifying the number of rows that are going to be filled?
(For some more info, we use python 3 and the library openpyxl to generate the spreadsheet)
Thanks!

Matching two sets of Data

I have one list of accounts that I pull at the beginning of the month. There is only one entry in this list per account number. I have another list which I compile throughout the month. I need for Excel to take the first list and list the entries that match to each account number. There will be a large majority that have two or more matches on the second sheet. I am currently using VLOOKUP, but it only returns the first match to each instead of listing all matches. HELLLPPPPP!!!!!!
Simple query in excel like the one you are using is the most excel can do, without using VBA.
Does Excel work like a database? It can work with many limitations, but Excel is not a database app. If you need to use many query and you do not know how to program in VBA, I would highly recommend you to use MS Access. There are many tutorial that you can find online, that will fulfill your needs easier and more efficiently than Excel would ever do.

Find specific values and extract in Excel

I am trying to automate a process, on where I need to search an Excel file to find specific values. Below is an example of an Excel file I get:
Now, the excel file contains all sorts of information. However, I only need to get below values (which can occurr on multiple pages). However, the setup is the same for all pages.
I need to get the "Tariff" number and the value for that tariff number, then add them all up. So, for example I would end up with this:
Is this even possible? And how would I go about this?

What's wrong with my above Excel-VBA code?

Brief description of what i want my VBA to achieve: I'm trying to import data from two Excel spreadsheets, and then compare the data on each list to find the missing elements in each list and then highlight the data row if it is missing.
Well there is a certain kind of order required to run Differences. Import_buttonx has to be called before Differences can be called. So you get an out of index because stringOfSheet(1,2) probably ha no value. It's probably nil. You can check while debugging through your code.

Resources