Split Names in Excel using multiple characters - excel

I've had some luck modifying formulas I've found on this site to separate names in a spreadsheet but I need some help. Can anyone suggest the best way to achieve my goal?
I have a "Tenant" column where each row contains from 1 -5 names, separated by commas and "&".
My data is pretty consistent so there is no need for error routines and it looks like these examples with the max # names being 5:
John Doe, Mary Smith, Rachel Reyes & Ben Thompson
or
John Doe & Mary Smith
or
John Doe, Mary Smith & Rachel Reyes
What I really want to do is separate each name into it's own column and then separate each first name into a another column. I would have a total of 5 columns for full names and 5 more for first names for up to 5 max names if that makes sense.
So for this data: John Doe, Mary Smith, Rachel Reyes & Ben Thompson
Column:
|A|B|C|D|E|F|G|H|I|J|
John Doe|John|Mary Smith|Mary|Rachel Reyes|Rachel|Ben Thompson|Ben|
Any help is appreciated.

Related

looking to split out an excel row into 1 line per option

I have an excel sheet where I have a record containing a travel request, but I need to process this out so I can see all the combinations I need to book.
The original record entry looks like this
ID Family Father Mother Children Destinations
KT1 Smith John Joan John,Mary London,New York
and I need the final result to look like this
ID Family Father Mother Children Destinations
KT1 Smith John Joan John London
KT1 Smith John Joan Mary London
KT1 Smith John Joan John New York
KT1 Smith John Joan Mary New York
(there may be multiple entries under any of the Children and destinations , and possibly other fields which would be needed as well )
I am really unsure of how to do this and would love some advice
Use PowerQuery.
Google its usage and where to find it if you're not familiar, a quick search will produce a lot of results ...
https://www.howtoexcel.org/power-query/the-complete-guide-to-power-query/
https://support.microsoft.com/en-us/office/create-load-or-edit-a-query-in-excel-power-query-ca69e0f0-3db1-4493-900c-6279bef08df4
From there, you can transform your data.
That will achieve your outcome with little to no fuss.

Formula for helper column(s) that determines singular or combined values

I am creating helper columns to assist me in reviewing our data, but I am running across an issue with one. What I am trying to accomplish is to create a helper column that tells me, by month, what type of medications a person is prescribed, and then combines multiple selections for the same name into a new name.
A sample data set would be:
A B C
1/1/2016 Doe, John Oral
1/1/2016 Doe, John Compound
1/1/2016 Doe, John Oral
2/1/2016 Smith, Jane Oral
2/1/2016 Smith, Jane Oral
2/1/2016 Adams, Tom Compound
2/1/2016 Doe, John Oral
So, for example, if John Doe was prescribed 2 oral medications and 1 compounded medication on 1/1/2016, the helper column would sort out that the three medications belong to the same person and are of two different types, so changes them to Combined. It would end up something akin to "1-Doe, John-Combined", displayed here:
D
1-Doe, John-Combined
1-Doe, John-Combined
1-Doe, John-Combined
2-Smith, Jane-Oral
2-Smith, Jane-Oral
2-Adams, Tom-Compound
2-Doe, John-Oral
So far, all I have is the concatenation by month:
=MONTH(A2)&"-"&B2&"-"
But I am not certain how to tackle the portion of the formula that will present the type of medication and combine (if required). Also, if necessary, more than one column can be created.
Thank you in advance.
Use SUMPRODUCT to test:
=MONTH(A1) & "-" & B1& "-" & IF(SUMPRODUCT((MONTH($A$1:$A$7)=MONTH(A1))*($B$1:$B$7=B1)*($C$1:$C$7<>C1))>0,"Combined",C1)

Extract list in excel based on criteria

I have a list of names and a list of categories in a table.
Example:
Name Category 1 Category 2 Category 3
Jane Doe X X
Bill Smith X X
Eric Hamilton X
From that list, I want to list the people for each category.
Example:
Category 1 Category 2 Category 3
Jane Doe Jane Doe Bill Smith
Bill Smith Eric Hamilton
Is there a way I can do this in excel?
I found this video which seems to accomplish what I want. The formula is a bit more complicated than what I was hoping for, but it worked. I just removed some of the absolute cell references and copied the formula for the number of categories I currently have and it grouped the users properly.
https://www.youtube.com/watch?v=QkHfZtvC7UQ

Unique numbering of unsorted sets

Is there a way to make this
---A---
John
John
Tim
steve
John
-------
into this:
-----A--------B------
John 1
John 1
Tim 2
Steve 3
John 1
---------------------
Have a large data file with duplicate names, and would like to number them in the way mentioned in order to use them in another way.
Please try:
=IF(COUNTIF(A$1:A2,A2)=1,MAX(B$1:B1)+1,VLOOKUP(A2,A$1:B1,2,0))
in B2 copied down, with labels or blanks in Row1.

Excel countif or if

Tried doing this a few ways and I think I'm just looking at this a little too complicated.
I have column a with several different names that repeat. I have column B with dollar amounts. I'm trying to get a formula that will add the totals amount for a specific person.
JOHN $17.23
JAMES $37.52
JOHN $14.23
JAMES $27.52
APRIL $32.00
APRIL $143.20
JOHN $90.27
JOHN $81.13
JOHN = Total for John
JAMES = Total for James
APRIL = Total for April
Thank you
Assuming this table
A B
1 Names Bill
2 John 10
3 Tom 20
4 John 4
5 Tom 3
To get the total for each name you can write
A B
7 Names Total
8 John =Sumif(A2:A5;A8;B2:B5)
9 Tom =Sumif(A2:A5;A9;B2:B5)
This will sum up each value for the given area.
Consider:
=SUMPRODUCT((A$1:A$8="John")*(B$1:B$8))
=SUMPRODUCT((A$1:A$8="James")*(B$1:B$8))
=SUMPRODUCT((A$1:A$8="April")*(B$1:B$8))
Striking my original response in favor of:
=SUMIF(B3:B10,"=JOHN",C3:C10) I tested that, and it works even better

Resources