Sorting a data range of multiple columns - excel

I'm currently watching about 700 videos about travel with different 80 possible categories throughout. So my idea is to have the video title in Column A. Then I have drop down menus that contain the 80 possible categories (Food, Beverage, Desert, Island, etc) in columns B through G.
So for instance
Row 1 - Column A 'Ecuador' - Column B is Food - Column C is Beverage - and Column D is South America
Row 2 - Column A 'France' - Column B is Tourist - Column C is Europe - Column D is Food
Row 3 - Column A 'Egypt' - Column B is Culture - Column C is Africa - Column D is Beverage
And so on for 700 videos.
Now the question is how could I sort or filter the videos by title to find any video that contains 'Food' if Food is found in any column B to G for that row? I want to make sure the rows stay in tact.
Let me know if my example makes sense or if I need to better illustrate the layout.
Any help is greatly appreciated!

type "search" in H1 cell, then put this formula in H2 :
=IFERROR(IF(FIND($I$1,B2&" "&C2&" "&D2&" "&E2&" "&F2&" "&G2)>0,1,""),"")
and drag downwards.
To use :
Type Food in I1
Then filter for '1' in column H ("search")
Hope it helps.
note : the space is included to separate the keywords. this search version is case sensitive.
p/s : I'm only covering the " filter the videos by title.." part. Since the criteria for the sort was not defined, I'm not trying it in this solution. ( :

Another option would be to use COUNTIF:
=COUNTIF($B2:$D2,E$1)
Much like p.phidot's solution, this would go in an additional column that you would use specifically to filter the spreadsheet. You would type your search term in the header of this column.
You could nest it in an IF function to make it return "Yes" or "No" rather than numbers:
=IF(COUNTIF($B2:$D2,E$1)>0,"Yes","No")

Related

EXCEL - Find if value exists in column B in the range of a value in column A

I have a list of companies with certain products. Now I want to find out if one company has a certain product or not. Example, I want to find out which company had Product C and return a one on all cells:
Column 1
Company A
Company A
Company A
Company A
Company B
Company B
Column 2
Product A
Product B
Product C
Product A
Product B
Column 3 (Result):
1
1
1
0
0
This solution will require 2 additional columns. I'm assuming your first row is headers, and the range is from A1:B6. Data starts on Row 2. I'll give a few options on how to execute this though. Where I put "Product C" can also reference a cell. Whenever I'm using binary like this it's usually to filter datasets, so there might be a better alternative to what you want vs. what's below.
In Column C, =if(B2="Product C",1,0) or you can use =--(B2="Product C")
Sort by Column C in Descending Order, =vlookup(A2,$A$2:$A$6,1,0) copy and paste as values, but if you keep the formula and resort it will mess up.
If Product C would only appear once for any given company you can us Sumifs too. =Sumifs($C$2:$C$6,$A$2:A$6$,A2)
If you have 365, you can also use Maxifs($C$2:$C$6,$A$2:A$6$,A2), which won't care how you sort the dataset.

Excel: Finding next equal match in column

I've googled for a solution to my problem for days and I just can't seem to get my head around how to do this.
I have 28 chickens and I track the eggs each one lays each month. My Excel sheet looks like this:
Current Egg-cel sheet
Column C is populated by the formula:
=LARGE($A$2:$A$29,$B1)
I'm using column B to increment the LARGE function
I want column D to populate with which chicken number laid the quantity in column C.
Obviously INDEX MATCH or VLOOKUP returns the first match for all equal values. How do I find the the next match? i.e.
Egg-cell sheet 2
I've seen similar questions and solutions but I for the life of me can not get it to work.
Use this formula in D2:
=INDEX(B:B,AGGREGATE(15,6,ROW($A$2:$A$29)/($A$2:$A$29=C2),COUNTIF($C$2:C2,C2)))
And drag down
If you're happy to add a few helper columns, this is a simple way to go:
The formula in column C creates a unique number by bringing together the eggs laid and the chicken number
=--(A2&"."&B2)
Column D is just your LARGE formula,
=LARGE($C$2:$C$4,B2)
Column E just gets the integer part of column D
=INT(D2)
And finally Column F gets the decimal part (chicken number) from column D
=--REPLACE(MOD(D2,1),1,2,"")

Finding companies appearing with different IDs in MS Excel

I have 2 columns in my data:
A - each company's unique ID.
B - the company name that corresponds to the respective ID.
This type of data extends to 13,000 rows. For instance:
Col A Col B
12 Google Inc
12 The Google
14 Google
18 Amazon
18 Amazon
21 Amazon INC
18 Amazon
...
As you can see from the example above, the issue is that sometimes the company has a different ID appearing. Furthermore, although in all 3 cases, the company is still the same, the fact that they've been worded differently makes it hard to do an exact match.
My goal in this exercise is two-fold:
Find which companies have different IDs showing.
Identify the row at which this happens.
It would be cumbersome to go through all 13,000 rows. What Excel formulas would do the trick?
You could use pivot tables to count how many duplicates each name has.
I would also:
Order the list by column B.
Add a formula in column c that compares the formula row with the previous row.
For example consider a formula in row 5:
=IF(B4=B5,"Identical","Different")
You could build in more intelligence for example compare the first word in the name in row 5 to see if it is in the row 4 name. eg
=IF( iserror( find( LEFT(B5,FIND(" ",B5,1)-1) ,B4,1) )
,""
,"Similar")
You could combine the above tow into a single function, or may use both in different columns (which is easier)
PART 2:
The data must be ordered by column B!
So using the above logic to compare the IDs you should add another column (column F) with this formula
= find( LEFT(B5,FIND(" ",B5,1)-1) ,B4,1)
Then add another column (column G)
=IF(B4=B5
, B5
, IF( iserror(F5) )
,""
, F5 )
)
This results in a value in column G which is either the identical company name or the first word of a company that has a matching name.
You can then add another column (column H) which compares the id's of rows with the same IDs
=IF(F4=F5
, IF(A4<>A5, "Different IDS, "Ok IDs")
, "First row in company group"
)

Searching 2D Excel array for a value, returning the value of the adjacent cell

I've been scouring this website throughout my last 2 programming classes, and decided it was worth joining this fabulous community!
In a nutshell, I want to create an "invoice maker", which allows one to first select a category via a dropdown box in A1, then an item within that category with a dropdown in B1. Excel would then autofill the price in the next column C1.
Essentially 2 (not sure what to call it: cascading, nested, dependent) dropdown boxes that when both filled, return a price. For example:
A B C
1 Category Item [Price]
Both dropdowns use Data Validation referring to a Defined Name, which is based on an array in sheet "Database". This sheet is formatted like so:
category1 price category2 price category3 price category4 price ...
item1 $xx item1 $xx item1 $xx item1 $xx
item2 $xx item2 $xx item2 $xx item2 $xx
I used this column arrangement mainly because it allows for each category to be expanded indefinitely. If you see a simpler way, let me know!
Essentially, to print the price in C1, my objective is to find the item name in the 2D Excel database, and return the cell immediately to the right of it. Ideally the formula in C1 would use cell A1 to determine which category to search, and search this column for the corresponding item name in B1. Then, it would +1 offset that to the right, thereby referring to the price.
As far as formulas, I have some rough pseudocode, but I'm confused between VLOOKUP, OFFSET, MATCH, and INDEX. Basically:
=INDEX( "defined name of my entire database" , MATCH( B1, **column corresponding to chosen component** , 0 ) + 1 , MATCH( A1 , components , 0 ) )
The way I see it, the INDEX would return the value of row+1 item, in a given column. The first MATCH would find the row in which the item is found, and the second MATCH would determine the column that category is found in.
Now my question is, how do I make the first MATCH search ONLY the column which corresponds to the right category?
Honestly I have no idea if my pseudocode is correct. I translated it to Formula, and it simply returns #N/A in the cell.
Many thanks for any help!!!
I would try the following approach:
Take the first column of the database sheet and offset it so many columns to right how the searched category is offset from the left. Then we have the price column of this category because we have offset it 1 column if it matched the first categrory, 3 if it matched the second category and so on.
From this column indicate the value from the row which is the same as the row in the found offset-1 column (the category column) which matches the searched item name.

Column A numbers matched with Column B numbers that are assigned to Column C =column D?

This is my example
Column A are numbers
Column B are numbers
Column C are Names
The A column are numbers associated with a item sold to one place. Column B is the items sold and C is the person who sold them. I would like column D to show the item sold to this one place and who sold it. Let me know if that makes sense.
PS: Column A has 1304 rows. Column B and C have 6154 rows
It is hard to guess what your data looks like, so assuming your data looks as below:
Here is my solution, I think it is a simple VLOOKUP problem:
Paste this =IF(ISERROR(VLOOKUP(C2,$A$2:$A$4,1,FALSE)),"","SoldToPlaceA") to E2 and drag it down to copy.

Resources