Jewells0905
New Member
- Joined
- Mar 10, 2024
- Messages
- 42
- Office Version
- 365
- Platform
- Windows
- MacOS
Hello All,
I am currently working on a project for my portfolio, below is the info I have been given. I am having trouble getting my formulas to work.
Your Task
The dataset to the right contains the Titanic data that you have worked with before. In cell G2 there is a function that will generate a list of unique last names. Study this function to understand how it works. Once you understand how the function operates, create a named function called UNIQUE_LAST_NAMES with a single parameter full_name_range to replace the function currently in cell G2.Once you have created the custom named function, clear the contents of cell G2 and use the function UNIQUE_LAST_NAMES to regenerate the list of unique last names.
* current function provided in cell G2 =UNIQUE(ARRAYFORMULA(IFERROR(LEFT(A2:A,FIND(",",A2:A)-1),LEFT(A2:A,FIND(" ",A2:A)-1))))
* I have named A2:A1314 "full_name" It is from sheet Titanic
*FULL_NAME_RANGE - current formula to extract the last name only from Column A - =LEFT(full_name,FIND(",",full_name)-1)
formula used without full_name - =LEFT(A2:A,FIND(",",A2:A)-1)
I have tested both of the above formulas and they work on their own
* Named function UNIQUE_LAST_NAMES - =UNIQUE(ARRAYFORMULA(IFERROR(LEFT(full_name,FIND(",",full_name)-1),LEFT(full_name,FIND(" ",full_name)-1))))
Below is a small snip from the sheet as it contains 1315 rows.
Name | PClass | Age | Gender | Survived | Unique Last Names | |
Allen, Miss Elisabeth Walton | 1st | 29 | female | 1 | Allen | |
Allison, Miss Helen Loraine | 1st | 2 | female | 0 | Allison | |
Allison, Mr Hudson Joshua Creighton | 1st | 30 | male | 0 | Anderson | |
Allison, Mrs Hudson JC (Bessie Waldo Daniels) | 1st | 25 | female | 0 | Andrews |
any help with this is greatly appreciated as I am not sure exactly where I've gone wrong, and have been messing with it for far too long.