I have created a table - Column A is the customers short name and column B is their account number. I need a formula that will look for the customers short name which is found in a text string (could be upper, lower or combination appearing somewhere in the cell) finding a match with the customers short name in the table returning the value of their customer number found in column b
If I understood it well, you could do:
=INDEX($B$2:$B$7,MATCH(TRUE,ISNUMBER(SEARCH($A$2:$A$7,D2)),0))
Related
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.
I have a three-column data set in Excel: Column A is Account Number, Column B is Product Type, and Column C is Current Balance (see image below).
The table I'm using has +150,000 rows, the image above is for illustrative purpose to simplify what I'm looking at. Multiple rows may have the same Account Number, but a different Product Type and/or Current Balance.
I would like to create a new column for a unique identifier that would label an Account Number as having "All A's", "All B's", or "Both". What in Excel (formula, VBA, etc) can be used to achieve this?
You can create a helper column in Column A and use the following formula starting in A2
=IF(COUNTIF($B$2:$B$9,$B2)=COUNTIFS($B$2:$B$9,$B2,$C$2:$C$9,$C2),"All "&$C2&"'s","Both")
EDIT:
You can also take it one step further and only return the requested answer for the first occurrence of an Account Number by using the following formula (again by beginning in A2)
=IF(COUNTIF($B$2:$B2,$B2)>1,"",IF(COUNTIF($B$2:$B$9,$B2)=COUNTIFS($B$2:$B$9,$B2,$C$2:$C$9,$C2),"All "&$C2&"'s","Both"))
I believe this formula would work (tweak for your ranges):
=IF(AND(COUNTIFS($B$2:$B$9,"A",$A$2:$A$9,D2)>0,COUNTIFS($B$2:$B$9,"B",$A$2:$A$9,D2)),"Both",IF(COUNTIFS($B$2:$B$9,"A",$A$2:$A$9,D2)>0,"All A's","All B's"))
#Kris - Please try the below solution.
I have added a new column by concatenating Account Number and Product Type. Using this column, created an Identifier column with the formula below.
Identifier column formula:
IF(COUNTIF($A$2:$A$9,A2)=COUNTIF($D$2:$D$9,D2),"All"&B2,"Both")
Hope this helps.
I'm working with a set of data in excel. Data is entered into rows for items specified in columns. The first column contains a date. A cell in the same row of one of the columns contains the name of a person and in another cell in the same row but different column may contain a number larger than zero (or it may be empty).
I need to create a formula which returns the date when a number larger than zero was last entered into that column for a specific name. This is a "living list" which keeps on growing and the same names appear in different rows, sometimes with a number in the column a mentioned and sometimes not.
I found an old thread on this site on a similar subject which got me as far as knowing the date of the last entry containing the persons name but I'm still not able to configure it to show me when that specific person also had a number larger than zero in that column.
Here's the thread: How to get the newest value from a column with conditions
My current formula looks like this:
=INDEX($A:$A,MATCH(MAX(IF($G:$G=Sheet7!C5,$A:$A,0)),IF($G:$G=Sheet7!C5,$A:$A,"")))
CTRL+SHIFT+ENTER
Column A contains the dates
Column G contains the names (and "Sheet7!C5" is a reference to a name)
The value column I need to add to the mix is column AY
I feel there must be a simple solution (a small add on to the formula) to solve this but I always end up with an error.
Thanks in advance :)
Edit: Here is a simplified example of the data entry and output list needed.
For this you need to sort the date DESCENDING and format the table as Excel Table
Edit: you can sort the date ascending. See explanation at the end.
Using your example, then the formula will be
=INDEX(TableData[Activity A], MATCH($B14, TableData[Employee initials], 0))
This works just like the usual VLOOKUP or INDEX MATCH, fetching the first date on an activity matching the employee initials.
You can use VLOOKUP, but you'll need to dynamically name the range of each columns.
Edit: Just today I found an interesting behavior of MATCH when it found multiple matching values. If you use 1 instead of 0, then it will fetch the last matching value on the list.
So, you can use this formula instead in ASCENDING table.
=INDEX(TableData[Activity A], MATCH($B14, TableData[Employee initials], 1))
I have an excel datasheet having data in the following order:
The first row in the dataset states that an Apple has 3 quality standards (A, B & C) and the price for each particular quality is on that row.
I would like to create a search functionality that allows the user to enter the name of fruit and quality and it would give the respective price.
Can someone help me how to approach this? I don't think a simple VLOOKUP would suffice my requirement. Thanks.
You can still use VLOOKUP, but with MATCH to specify the column index you want to return the value from.
=VLOOKUP(G2,A2:D4,MATCH(G3,A2:D2,0),FALSE)
In this case, the lookup value for VLOOKUP is the fruit name, the table range is the table containing the fruit, quality, and price, and the search type is exact. The third parameter, instead of having a number indicating what column, uses the MATCH formula. The first parameter is the value to look up (the entered quality), the second parameter is the header row of your table containing the qualities, and the third parameter indicates an exact search. MATCH will return a number containing the index of the column that matches the entered quality, and that is the column index used by VLOOKUP.
As the title says, I need to compare two columns for a match or partial match and then copy a value from a third column into a fourth column.
A condensed version of my issue below:
I need to compare the product ID and the supplier product ID (be it match or partial match) then copy the supplier product price into the new product cost column.
I am having limited success with my VLookup formula for matching product ID's as I only know how to do exact matches and not partial matches.
Not every line of the supplier product ID has data in it, nor is the product ID list and the supplier ID list the same length.
The spreadsheet has approximately 2000 products in it.
Any help is greatly appreciated! :)
From your description, this formula copied into C3 will work for you.
=IF(ISNUMBER(SEARCH(A3,MID(F3,2,3))),G3, IF(ISNUMBER(SEARCH(MID(F3,2,3),A3)),G3, IF(ISNUMBER(SEARCH(A3,F3)), G3, IF(ISNUMBER(SEARCH(F3,A3)), G3, ""))))
I know it looks hard, but its really just testing for equality between the middle of the ID codes, and then if either is just a substring of the other.
It not being vba also means you won't have to make it a macro enabled workbook.