If cell contains text from a range of other cells - excel

I am working on a project where the aim is to categorize spending on bank statements based on their description. Bank statements are uploaded onto an excel spreadsheet each month, which then should look at the description of each spend and assign it to a category.
There are 75 spend categories listed out in a row, and under each category there is a list of text against which the description of the spends on the bank statement needs to be matched. If the description contains text from a cell, the function should say which category that particular cell is under.
$K$3:$CG$3 is where I have the names of the categories
$K$4:$CG$502 is where I have the list of all the identifying text for each of the categories
C is the column in which the descriptions from the bank statements are
I have come up with the below formula, which works fine however if I expand it to the full range of identifiers (replace $K$4:$CG$4with $K$4:$CG$502 in SEARCH function) it fails.
={INDEX($K$3:$CG$3,1,MATCH(TRUE,ISNUMBER(SEARCH($K$4:$CG$4,C6)),0))}
Any help is much appreciated.
The table is found on this link. Column D is the expected outcome once the SEARCH function is expanded as in Column E, which currently arrives to N/A. "nnnnn" values in columns K to CG are dummy values and will be populated by users.

Using INDEX(), AGGREGATE() & COLUMN() Function, you may try this formula,
• Formula in cell D3
=INDEX($K$3:$CG$3,
AGGREGATE(15,6,(COLUMN(Control!$K$4:$CG$502)-COLUMN(Control!$K$4)+1)/
(ISNUMBER(SEARCH(Control!$K$4:$CG$502,C3))),1))
And Fill Down! Workbook_Link

Related

Trying to reference data in variable rows after matching specific cell in excel

In Excel I'm trying to paste in weekly time card reports and then reference the bottom line of each section which contains the yellow highlighted text string in column B (report contains 15-20 sections with variable row differences).
Without using VBA, is there a way to identify an employee ID (Column A), then calculate how many rows below that ID that the last text string cell is located in column B (Highlighted in yellow in the example). Then use that row difference to offset the INDEX formula to grab correct row from the table.
I was using INDEX/MATCH to find the employee ID and then trying to offset the row return per employee manually when I realized that the different job codes rendered that formula inaccurate.
I had used this to reference the proper columns with the offset for one of the weeks, but each week varies. The "+17" at the end of the below formula is where I need the variable row difference to grab the yellow highlighted cell.
=INDEX($A$1:$A$100,(MATCH(A61,$B1:$B$100,0)+17))
Thanks in advance, hopefully I provided the right info to answer the question if there is a solution!
after a revamp of the thought process, the following formula will return the information corresponding to as specific employee and their tax information which is stored in column B in a cell with "EFURTA" in it. No other cell in B within the employee block can contain "EFURTA". If that happens only the first occurence will be returned.
Assuming your data is layed out per the image below, the following formula will return the information you are looking for:
=INDEX(B:B,AGGREGATE(15,6,ROW($A$1:$A$80)/((FIND("ERFUTA",$B$1:$B$80)>0)*(ROW($A$1:$A$80)>MATCH(D2,$A$1:$A$80,0))),1))
Adjust the ranges to suit your data.
If you just want the row number, just grab the aggregate part of the formula and drop the index.

Updating Price List in Excel with vlookup or Index/Match

I'm a book wholesaler and need to update my price and stock list constantly to share with some customers in excel format; also to use in importing to websites.
As in the image above, what I need is a formula for Column D to search for SKU in C2 in A-column for an exact match; return the value from B to the corresponding cell in D column.
I have searched countless topics, even found a solution in previous weeks but every time I use the same formula I get N/A or REF error.
TIA
Welcome to SO. Yor formula is good, but you are mixing numbers with text. In column A, the codes you are listing are stored as TEXT (note that they are left aligned inside cell), but the values you have in column C are stored as NUMBERS (note that they are right aligned insided cell). So Excel is looking for that NUMBER, but it finds no NUMBER in column A that matches, and returns N/A.
So before searching, let's convert the number in column C to a text, and let's see what happens. Try something like this:
=VLOOKUP(TEXT(C2;"#");$A$2:$B$2349;2;FALSE)
Hope you can adapt this to your needs.

Excel: replacing an abbreviation with a string of text

I'm having trouble with using replace/substitute to auto replace an abbreviation with lines of text.
To make it easier for my crews to input their work, simply typing "wc" should be autofilling as "White Can 20L 308728"
We have various products with product codes to input but everything I'm finding references an already existing cell or replaces already existing text.
Suggestion is to tabulate these products with their product codes and apply a VLOOKUP function to return the appropriate product description when a user types in a certain code. Limitation of this would be that the cell in which the worker would type in a code would not be the same cell that returns the appropriate product description for that code.
So assuming you have your list of product codes and description in Sheet2 - columns A (it is essential that this should be the product codes) and B (product description), and you want the formula to run in sheet1, you can use the following formula:
=VLOOKUP(A1,Sheet2!$A:$B,2,0)
This assumes that you'll be encoding your code in cell A1 of Sheet1 (or any sheet other than your reference sheet).

Key words and sum equations

Sample Page I have a spreadsheet That I am having trouble getting a formula running.
I have a table that has a handful of columns, being brand, description and sales.
I need to get a formula that will automatically find a keyword in column A and B and SUM all the totals to transfer to another worksheet.
Example I have 2 similar products by name, Demo Firm, and Demo Soft. I have them sorted into text to columns to make it easier to search. Demo in the 1st Column, Firm in the 2nd, Sales in the 3rd.
I need to be able to search all of column A and find every word "DEMO", then I need the formula to Search Colum B and Find all the "Firm", finally I need it to sum up the totals of Column 3 of "DEMO FIRM" and place the sum into Column4.
I have tried IFSUM, IFSUMS, and DSUM but I think I am missing one little step.
I hope this makes sense, in my head I know what I want to do, explaining it is difficult.
Thanks for your help. Will keep an eye on my email if further info needed.
I have uploaded an image of what I am needing (SAMPLE PAGE at top of post). The formula that was commented worked for a my small sample. I just need to make sure it will work on an ever changing spreadsheet.
If it is assumed that your data fills rows 2-10, i.e. A2:A10, etc., but obviously this can be changed as needed. As I understand it, you want to sum up all sales into Column D, based on the values in Column A and Column B. You can simply use a SUMIFS formula in Column D, in this case D2 and drag down for all rows, as follows:
=SUMIFS($C$2:$C$10, $A$2:$A$10, A2, $B$2:$B$10, B2)
So if A2 contains DEMO and B2 contains FIRM, then this formula will sum all of the sales totals in Column C where Column A contains DEMO and Column B contains FIRM.

Entering repeating data in Excel

I am a travel agent and maintain a data base tracking my commission. I am constantly adding new bookings which consist of a hotel name, address and zip code. Many of these hotels I use quite frequently so when i type the name of the hotel in cell A1, I wold like cell A2 to automatically populate with the address, cell A3 to populate with the state and cell A4 to populate with the zip. I could eliminate a lot of data entry. How could I do this.
In another sheet enter the information for all the hotels. I suppose that you could have unique names for your hotels. You can use VLOOKUP() to search that table and populate that information.
If you want the information to appear automatically, just have more rows of formula than you have data on your sheet and use IFERROR() so that if there is no data entered into the first column you do not display an error.
As you can see here, the information is retrieved via VLOOKUP on another sheet and the formula you see is in B2. Normally that cell should display #N/A but since we are using IFERROR() this does not happen and you have a nice output.
And here because I think you might not be familiar with VLOOKUP. VLOOKUP has 4 parameters:
The value to look for;
The range in which 1) the value to look for is and 2) the value to retrieve is;
The number of the column in which the information to retrieve is;
0 if you want an exact match, 1 if you want an approximate match
You just have to remember that VLOOKUP will always use the first column of the supplied range to search for the specified value so you 'key' has to be in the first column.
Create an additional worksheet containing the hotel data and then use something like vlookup from your primary worksheet.

Resources