How to search through an array of rows for a partial string in excel - excel

I am used to Excel but am still pretty new to more complex formulas. I am trying to fill in the id field in the data table automatically based on the name.
I have two tables, one is a list of employees, and another is a log of associates' actions.
Here is the ID list.
A5 ID
A6 Name
123
Foo Bar
321
John Doe
246
Jane Doe
135
Mike Jones
Here is the log list.
A1 ID
A2 Name
A3 Action
Jane Doe
xxxxx
John Doe
abcdefg
Jane Doe
zzzzz
Foo Bar
yyyyyyy
I want to be able to take the current cell's index in the log and compare the name to the list of employees and copy the cell to the left of it to get the id.
Do you know of any formulas that would guide me to my goal?

Related

Excel Column to Rows with it's Other Data

I have an excel sheet that looks like this:
FIRSTNAME LASTNAME COURSE
John Doe 1,2
Jane Doe 1,3
Does Excel have any functionality to end up with something like this:
FIRSTNAME LASTNAME COURSE
John Doe 1
John Doe 2
Jane Doe 1
Jane Doe 3
I've seen some samples on Text to Columns but that doesn't seem like what I want. Is there a combination of magical formulas to create such results?
I'm perfectly fine with this result as well (I'm currently trying LOOKUP, VLOOKUP, and/or HLOOKUP for this):
SHEET1
FIRSTNAME LASTNAME COURSE
John Doe 1
Jane Doe 1
SHEET2
FIRSTNAME LASTNAME COURSE
John Doe 2
SHEET3
FIRSTNAME LASTNAME COURSE
Jane Doe 3
Thank you.
Load the data into Power Query. Then use ribbon commands to
Split the Course column by the comma delimiter
select the two name columns
Transform > Unpivot Other Columns
rename the columns for Attribute and Value
remove columns you don't need
load into Excel

Logic function to combine all matching text into one cell

I am looking for help with a formula that looks for all matching text and combines the results into a single cell. For example if the Country is Colombia I want a single cell to list all of the names that match Colombia.
ColA ColB
A1: COUNTRY NAME
A2: Argentina John Doe
A3: Bahamas Jan Doe
A4: Colombia James Doe
A5: Colombia Jason Doe
A6: Colombia Julian Doe
I've toyed around with CONCANTENATE and MATCH however they don't seem to be getting me what I need.

Count repetitive values in column B based on unique value in column A

I have the following table:
1 John Doe
John Doe
2 Adam Smith
Adam Smith
Adam Smith
I need to count the number of times a name appears for each number value in column A. The numbers are unique.
Place this formula in cell C1 and drag down until the end.
=IF(ISNUMBER(A1),COUNTIF(B:B,B1),"")
n.b. - you can more clearly define row numbers instead of using B:B if you like as well

How to use the filter selection as a text header in another cell in Excel

I am trying to create a header cell based on the results of a filter applied to a column. For example I have a filter that lists results based on name. I am trying to pull a unique list or the filter selection and display the result in another cell:
Example:
Column G Filter Results: (selecting only Doe, John and Smith, Jane from multiple choices)
Doe, John
Doe, John
Smith, Jane
Doe, John
Smith, Jane
What I want to do is to display a unique result in Column A1 of:
Doe, John: Smith, Jane
Simply referencing the filter selection as a text literal would make the most sense, but I have no idea how to reference that in Excel
I am using Excel 2007

Move content from 1 column to 3 columns

I have long file with this content:
John Doe1
Street Foo 35
New York
Mary Johnson
Street Foo 49
Los Angeles
Robert Deniro
Street Bar 47
Washington
...
As you can see there is one column with Name, Address, Town, Name, Address, Town..
I would like to convert it automatically to a file with 3 colums:
John Doe1 Street Foo 35 New York
Mary Johnson Street Foo 49 Los Angeles
Robert Deniro Street Bar 47 Washington
...
Is that possible?
Excel 2007/Windows 7
Based on this similar answer, and assuming your data lays in A1:A50 (you can extend this range in the formulas below as needed), then:
Cell B1: =INDEX($A$1:$A$50,ROW()*3-2,1)
Cell C1: =INDEX($A$1:$A$50,ROW()*3-1,1)
Cell D1: =INDEX($A$1:$A$50,ROW()*3,1)
This gives you one line of rearranged data. Copy B1:D1 downwards, as far as needed.
I am sure answered many times (and in different ways) on SO already but since I can't presently find an example you might try:
Add a column with =MOD(ROW(),3) copied down to suit and convert to values. Copy your data column twice, deleting top cell from first copy and top two cells from second. Filter to delete rows other than with 1 in what was the MOD column.

Resources