Named ranges/functions formula trouble with Google Sheets

Jewells0905

New Member
Joined
Mar 10, 2024
Messages
42
Office Version
  1. 365
Platform
  1. Windows
  2. 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
1714676273586.png

*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))))
1714676558936.png


Below is a small snip from the sheet as it contains 1315 rows.

NamePClassAgeGenderSurvivedUnique Last Names
Allen, Miss Elisabeth Walton1st29female1Allen
Allison, Miss Helen Loraine1st2female0Allison
Allison, Mr Hudson Joshua Creighton1st30male0Anderson
Allison, Mrs Hudson JC (Bessie Waldo Daniels)1st25female0Andrews


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.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I finally got this one figured out so just in case anyone else runs across this here is my solution.

G2- =UNIQUE_LAST_NAMES(full_name)
 
Upvote 0
Solution

Forum statistics

Threads
1,224,798
Messages
6,181,038
Members
453,013
Latest member
Shubashish_Nandy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top