The request

From Angela Lewis, Senior Data Analyst
Your goal
Step 1 of 3. In G2:G48, the city from column E trimmed and with each word capitalised. In H2:H48, the state from column F trimmed and in capitals.
- Fill
G2:H48with the right valuesnot done yet - With formulas, not typed numbersnot done yet
- Use
TRIMPROPERUPPERnot done yet
Step 2 of 3. In I2:I48, build the email key: the email in column D trimmed and in lower case. In J2:J48, count with COUNTIF how many rows in the whole key column share this row's key.
- Fill
I2:J48with the right valuesnot done yet - With formulas, not typed numbersnot done yet
- Use
TRIMLOWERCOUNTIFnot done yet
Step 3 of 3. In K2:K48, list each row's problems with TEXTJOIN, separated by a comma and a space, in this order: city when the clean city differs from the raw one (use EXACT), state when the clean state differs (EXACT), duplicate when the copies count is above 1. A row with no problem stays empty. In N1, count the rows whose problems cell isn't empty, with COUNTIF and the criteria "?*".
- Fill
K2:K48, N1with the right valuesnot done yet - With formulas, not typed numbersnot done yet
- Use
TEXTJOINEXACTCOUNTIFnot done yet
Step 1 · your sheet
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | customer_id | first_name | last_name | city | state | clean_city | clean_state | email_key | copies | problems | Rows with a problem | |||
| 2 | 21 | Margaret | Thompson | mthompson57@gmail.com | Kansas City | MO | ||||||||
| 3 | 38 | Diane | Castillo | diane.castillo@gmail.com | St. Louis | MO | ||||||||
| 4 | 72 | James | Brown | jamesbrown1972@aol.com | Kansas City | MO | ||||||||
| 5 | 79 | Christopher | Roberts | christopher.roberts@gmail.com | St. Louis | MO | ||||||||
| 6 | 185 | Cynthia | Wallace | cwallace14@yahoo.com | St. Louis | MO | ||||||||
| 7 | 196 | Wei | Diaz | weidiaz1993@gmail.com | Kansas City | MO | ||||||||
| 8 | 209 | Jeffrey | Garcia | jeffrey.garcia@gmail.com | Kansas City | MO | ||||||||
| 9 | 233 | Aaliyah | Coleman | acoleman@harlowstudio.com | St. Louis | MO | ||||||||
| 10 | 267 | Edward | Russell | edwardrussell1996@gmail.com | St. Louis | MO | ||||||||
| 11 | 356 | Samuel | Cruz | scruz78@yahoo.com | St. Louis | MO | ||||||||
| 12 | 380 | Carlos | Thompson | carlos.thompson@gmail.com | Kansas City | MO | ||||||||
| 13 | 397 | Aaron | Edwards | aaronedwards1968@gmail.com | St. Louis | MO | ||||||||
| 14 | 455 | Noah | Barnes | nbarnes@parkrowhotels.com | St. Louis | MO | ||||||||
| 15 | 499 | Thomas | Davis | tdavis10@comcast.net | Kansas City | MO | ||||||||
| 16 | 573 | Joshua | Richardson | joshua.richardson@gmail.com | St. Louis | MO | ||||||||
| 17 | 577 | Scott | Thomas | sthomas25@gmail.com | Kansas City | MO | ||||||||
| 18 | 594 | Andrew | Anderson | andrewanderson2000@gmail.com | Kansas City | MO | ||||||||
| 19 | 622 | Amanda | Gomez | amanda.gomez@yahoo.com | KANSAS CITY | MO | ||||||||
| 20 | 705 | Sofia | Lee | sofia.lee@gmail.com | St. Louis | MO | ||||||||
| 21 | 712 | Sofia | Thomas | sofiathomas1993@outlook.com | St. Louis | MO | ||||||||
| 22 | 713 | Justin | Hayes | jhayes11@gmail.com | St. Louis | MO | ||||||||
| 23 | 718 | Sofia | Anderson | sofia.anderson@yahoo.com | St. Louis | MO | ||||||||
| 24 | 740 | Deborah | Kelly | deborahkelly1960@hotmail.com | Kansas City | MO | ||||||||
| 25 | 768 | Christina | Wright | christinawright1991@outlook.com | Kansas City | MO | ||||||||
| 26 | 785 | Peter | Wallace | peterwallace1993@gmail.com | Kansas City | MO | ||||||||
| 27 | 812 | Joyce | Rivera | joyce.rivera@yahoo.com | St. Louis | MO | ||||||||
| 28 | 954 | Mason | Wallace | mwallace75@outlook.com | St. Louis | MO | ||||||||
| 29 | 960 | Joyce | Peterson | joyce.peterson@yahoo.com | Kansas City | MO | ||||||||
| 30 | 1004 | Rebecca | Kim | rebecca.kim@gmail.com | St. Louis | MO | ||||||||
| 31 | 1055 | Gary | Cox | gary.cox@yahoo.com | St. Louis | MO | ||||||||
| 32 | 1060 | Maria | White | mwhite44@gmail.com | St. Louis | MO | ||||||||
| 33 | 1151 | Stephen | Mitchell | stephen.mitchell@gmail.com | Kansas City | MO | ||||||||
| 34 | 1234 | Anthony | Martinez | anthony.martinez@aol.com | St. Louis | MO | ||||||||
| 35 | 1307 | Nathan | Brooks | nbrooks94@gmail.com | St. Louis | MO | ||||||||
| 36 | 1313 | William | Baker | wbaker@bluecedarhomes.com | St. Louis | MO | ||||||||
| 37 | 1472 | Richard | Jimenez | rjimenez73@gmail.com | St. Louis | MO | ||||||||
| 38 | 1544 | Caleb | Bailey | cbailey10@icloud.com | Kansas City | MO | ||||||||
| 39 | 1556 | Melissa | Mendoza | mmendoza@evergreenproperties.com | St. Louis | MO | ||||||||
| 40 | 1563 | Debra | Jimenez | djimenez29@gmail.com | Kansas City | MO | ||||||||
| 41 | 1587 | Olivia | Sullivan | olivia.sullivan@outlook.com | Kansas City | MO | ||||||||
| 42 | 1711 | Brooke | Richardson | brookerichardson1980@hotmail.com | St. Louis | MO | ||||||||
| 43 | 1761 | Brenda | Harris | bharris64@icloud.com | St. Louis | MO | ||||||||
| 44 | 1894 | Stephen | Long | stephen.long@gmail.com | Kansas City | MO | ||||||||
| 45 | 1951 | Michael | Mendoza | mmendoza84@outlook.com | Kansas City | MO | ||||||||
| 46 | 1994 | Dennis | Long | dennislong1975@gmail.com | St. Louis | MO | ||||||||
| 47 | 2006 | Edward | Russell | edwardrussell1996@gmail.com | St. Louis | MO | ||||||||
| 48 | 2012 | Noah | Barnes | nbarnes@parkrowhotels.com | St. Louis | MO | ||||||||
| 49 | ||||||||||||||
| 50 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Each right cell becomes a firefly in your lantern.
Step 2 · your sheet
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | customer_id | first_name | last_name | city | state | clean_city | clean_state | email_key | copies | problems | Rows with a problem | |||
| 2 | 21 | Margaret | Thompson | mthompson57@gmail.com | Kansas City | MO | Kansas City | MO | ||||||
| 3 | 38 | Diane | Castillo | diane.castillo@gmail.com | St. Louis | MO | St. Louis | MO | ||||||
| 4 | 72 | James | Brown | jamesbrown1972@aol.com | Kansas City | MO | Kansas City | MO | ||||||
| 5 | 79 | Christopher | Roberts | christopher.roberts@gmail.com | St. Louis | MO | St. Louis | MO | ||||||
| 6 | 185 | Cynthia | Wallace | cwallace14@yahoo.com | St. Louis | MO | St. Louis | MO | ||||||
| 7 | 196 | Wei | Diaz | weidiaz1993@gmail.com | Kansas City | MO | Kansas City | MO | ||||||
| 8 | 209 | Jeffrey | Garcia | jeffrey.garcia@gmail.com | Kansas City | MO | Kansas City | MO | ||||||
| 9 | 233 | Aaliyah | Coleman | acoleman@harlowstudio.com | St. Louis | MO | St. Louis | MO | ||||||
| 10 | 267 | Edward | Russell | edwardrussell1996@gmail.com | St. Louis | MO | St. Louis | MO | ||||||
| 11 | 356 | Samuel | Cruz | scruz78@yahoo.com | St. Louis | MO | St. Louis | MO | ||||||
| 12 | 380 | Carlos | Thompson | carlos.thompson@gmail.com | Kansas City | MO | Kansas City | MO | ||||||
| 13 | 397 | Aaron | Edwards | aaronedwards1968@gmail.com | St. Louis | MO | St. Louis | MO | ||||||
| 14 | 455 | Noah | Barnes | nbarnes@parkrowhotels.com | St. Louis | MO | St. Louis | MO | ||||||
| 15 | 499 | Thomas | Davis | tdavis10@comcast.net | Kansas City | MO | Kansas City | MO | ||||||
| 16 | 573 | Joshua | Richardson | joshua.richardson@gmail.com | St. Louis | MO | St. Louis | MO | ||||||
| 17 | 577 | Scott | Thomas | sthomas25@gmail.com | Kansas City | MO | Kansas City | MO | ||||||
| 18 | 594 | Andrew | Anderson | andrewanderson2000@gmail.com | Kansas City | MO | Kansas City | MO | ||||||
| 19 | 622 | Amanda | Gomez | amanda.gomez@yahoo.com | KANSAS CITY | MO | Kansas City | MO | ||||||
| 20 | 705 | Sofia | Lee | sofia.lee@gmail.com | St. Louis | MO | St. Louis | MO | ||||||
| 21 | 712 | Sofia | Thomas | sofiathomas1993@outlook.com | St. Louis | MO | St. Louis | MO | ||||||
| 22 | 713 | Justin | Hayes | jhayes11@gmail.com | St. Louis | MO | St. Louis | MO | ||||||
| 23 | 718 | Sofia | Anderson | sofia.anderson@yahoo.com | St. Louis | MO | St. Louis | MO | ||||||
| 24 | 740 | Deborah | Kelly | deborahkelly1960@hotmail.com | Kansas City | MO | Kansas City | MO | ||||||
| 25 | 768 | Christina | Wright | christinawright1991@outlook.com | Kansas City | MO | Kansas City | MO | ||||||
| 26 | 785 | Peter | Wallace | peterwallace1993@gmail.com | Kansas City | MO | Kansas City | MO | ||||||
| 27 | 812 | Joyce | Rivera | joyce.rivera@yahoo.com | St. Louis | MO | St. Louis | MO | ||||||
| 28 | 954 | Mason | Wallace | mwallace75@outlook.com | St. Louis | MO | St. Louis | MO | ||||||
| 29 | 960 | Joyce | Peterson | joyce.peterson@yahoo.com | Kansas City | MO | Kansas City | MO | ||||||
| 30 | 1004 | Rebecca | Kim | rebecca.kim@gmail.com | St. Louis | MO | St. Louis | MO | ||||||
| 31 | 1055 | Gary | Cox | gary.cox@yahoo.com | St. Louis | MO | St. Louis | MO | ||||||
| 32 | 1060 | Maria | White | mwhite44@gmail.com | St. Louis | MO | St. Louis | MO | ||||||
| 33 | 1151 | Stephen | Mitchell | stephen.mitchell@gmail.com | Kansas City | MO | Kansas City | MO | ||||||
| 34 | 1234 | Anthony | Martinez | anthony.martinez@aol.com | St. Louis | MO | St. Louis | MO | ||||||
| 35 | 1307 | Nathan | Brooks | nbrooks94@gmail.com | St. Louis | MO | St. Louis | MO | ||||||
| 36 | 1313 | William | Baker | wbaker@bluecedarhomes.com | St. Louis | MO | St. Louis | MO | ||||||
| 37 | 1472 | Richard | Jimenez | rjimenez73@gmail.com | St. Louis | MO | St. Louis | MO | ||||||
| 38 | 1544 | Caleb | Bailey | cbailey10@icloud.com | Kansas City | MO | Kansas City | MO | ||||||
| 39 | 1556 | Melissa | Mendoza | mmendoza@evergreenproperties.com | St. Louis | MO | St. Louis | MO | ||||||
| 40 | 1563 | Debra | Jimenez | djimenez29@gmail.com | Kansas City | MO | Kansas City | MO | ||||||
| 41 | 1587 | Olivia | Sullivan | olivia.sullivan@outlook.com | Kansas City | MO | Kansas City | MO | ||||||
| 42 | 1711 | Brooke | Richardson | brookerichardson1980@hotmail.com | St. Louis | MO | St. Louis | MO | ||||||
| 43 | 1761 | Brenda | Harris | bharris64@icloud.com | St. Louis | MO | St. Louis | MO | ||||||
| 44 | 1894 | Stephen | Long | stephen.long@gmail.com | Kansas City | MO | Kansas City | MO | ||||||
| 45 | 1951 | Michael | Mendoza | mmendoza84@outlook.com | Kansas City | MO | Kansas City | MO | ||||||
| 46 | 1994 | Dennis | Long | dennislong1975@gmail.com | St. Louis | MO | St. Louis | MO | ||||||
| 47 | 2006 | Edward | Russell | edwardrussell1996@gmail.com | St. Louis | MO | St. Louis | MO | ||||||
| 48 | 2012 | Noah | Barnes | nbarnes@parkrowhotels.com | St. Louis | MO | St. Louis | MO | ||||||
| 49 | ||||||||||||||
| 50 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Each right cell becomes a firefly in your lantern.
Step 3 · your sheet
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | customer_id | first_name | last_name | city | state | clean_city | clean_state | email_key | copies | problems | Rows with a problem | ||||
| 2 | 21 | Margaret | Thompson | mthompson57@gmail.com | Kansas City | MO | Kansas City | MO | mthompson57@gmail.com | 1 | |||||
| 3 | 38 | Diane | Castillo | diane.castillo@gmail.com | St. Louis | MO | St. Louis | MO | diane.castillo@gmail.com | 1 | |||||
| 4 | 72 | James | Brown | jamesbrown1972@aol.com | Kansas City | MO | Kansas City | MO | jamesbrown1972@aol.com | 1 | |||||
| 5 | 79 | Christopher | Roberts | christopher.roberts@gmail.com | St. Louis | MO | St. Louis | MO | christopher.roberts@gmail.com | 1 | |||||
| 6 | 185 | Cynthia | Wallace | cwallace14@yahoo.com | St. Louis | MO | St. Louis | MO | cwallace14@yahoo.com | 1 | |||||
| 7 | 196 | Wei | Diaz | weidiaz1993@gmail.com | Kansas City | MO | Kansas City | MO | weidiaz1993@gmail.com | 1 | |||||
| 8 | 209 | Jeffrey | Garcia | jeffrey.garcia@gmail.com | Kansas City | MO | Kansas City | MO | jeffrey.garcia@gmail.com | 1 | |||||
| 9 | 233 | Aaliyah | Coleman | acoleman@harlowstudio.com | St. Louis | MO | St. Louis | MO | acoleman@harlowstudio.com | 1 | |||||
| 10 | 267 | Edward | Russell | edwardrussell1996@gmail.com | St. Louis | MO | St. Louis | MO | edwardrussell1996@gmail.com | 2 | |||||
| 11 | 356 | Samuel | Cruz | scruz78@yahoo.com | St. Louis | MO | St. Louis | MO | scruz78@yahoo.com | 1 | |||||
| 12 | 380 | Carlos | Thompson | carlos.thompson@gmail.com | Kansas City | MO | Kansas City | MO | carlos.thompson@gmail.com | 1 | |||||
| 13 | 397 | Aaron | Edwards | aaronedwards1968@gmail.com | St. Louis | MO | St. Louis | MO | aaronedwards1968@gmail.com | 1 | |||||
| 14 | 455 | Noah | Barnes | nbarnes@parkrowhotels.com | St. Louis | MO | St. Louis | MO | nbarnes@parkrowhotels.com | 2 | |||||
| 15 | 499 | Thomas | Davis | tdavis10@comcast.net | Kansas City | MO | Kansas City | MO | tdavis10@comcast.net | 1 | |||||
| 16 | 573 | Joshua | Richardson | joshua.richardson@gmail.com | St. Louis | MO | St. Louis | MO | joshua.richardson@gmail.com | 1 | |||||
| 17 | 577 | Scott | Thomas | sthomas25@gmail.com | Kansas City | MO | Kansas City | MO | sthomas25@gmail.com | 1 | |||||
| 18 | 594 | Andrew | Anderson | andrewanderson2000@gmail.com | Kansas City | MO | Kansas City | MO | andrewanderson2000@gmail.com | 1 | |||||
| 19 | 622 | Amanda | Gomez | amanda.gomez@yahoo.com | KANSAS CITY | MO | Kansas City | MO | amanda.gomez@yahoo.com | 1 | |||||
| 20 | 705 | Sofia | Lee | sofia.lee@gmail.com | St. Louis | MO | St. Louis | MO | sofia.lee@gmail.com | 1 | |||||
| 21 | 712 | Sofia | Thomas | sofiathomas1993@outlook.com | St. Louis | MO | St. Louis | MO | sofiathomas1993@outlook.com | 1 | |||||
| 22 | 713 | Justin | Hayes | jhayes11@gmail.com | St. Louis | MO | St. Louis | MO | jhayes11@gmail.com | 1 | |||||
| 23 | 718 | Sofia | Anderson | sofia.anderson@yahoo.com | St. Louis | MO | St. Louis | MO | sofia.anderson@yahoo.com | 1 | |||||
| 24 | 740 | Deborah | Kelly | deborahkelly1960@hotmail.com | Kansas City | MO | Kansas City | MO | deborahkelly1960@hotmail.com | 1 | |||||
| 25 | 768 | Christina | Wright | christinawright1991@outlook.com | Kansas City | MO | Kansas City | MO | christinawright1991@outlook.com | 1 | |||||
| 26 | 785 | Peter | Wallace | peterwallace1993@gmail.com | Kansas City | MO | Kansas City | MO | peterwallace1993@gmail.com | 1 | |||||
| 27 | 812 | Joyce | Rivera | joyce.rivera@yahoo.com | St. Louis | MO | St. Louis | MO | joyce.rivera@yahoo.com | 1 | |||||
| 28 | 954 | Mason | Wallace | mwallace75@outlook.com | St. Louis | MO | St. Louis | MO | mwallace75@outlook.com | 1 | |||||
| 29 | 960 | Joyce | Peterson | joyce.peterson@yahoo.com | Kansas City | MO | Kansas City | MO | joyce.peterson@yahoo.com | 1 | |||||
| 30 | 1004 | Rebecca | Kim | rebecca.kim@gmail.com | St. Louis | MO | St. Louis | MO | rebecca.kim@gmail.com | 1 | |||||
| 31 | 1055 | Gary | Cox | gary.cox@yahoo.com | St. Louis | MO | St. Louis | MO | gary.cox@yahoo.com | 1 | |||||
| 32 | 1060 | Maria | White | mwhite44@gmail.com | St. Louis | MO | St. Louis | MO | mwhite44@gmail.com | 1 | |||||
| 33 | 1151 | Stephen | Mitchell | stephen.mitchell@gmail.com | Kansas City | MO | Kansas City | MO | stephen.mitchell@gmail.com | 1 | |||||
| 34 | 1234 | Anthony | Martinez | anthony.martinez@aol.com | St. Louis | MO | St. Louis | MO | anthony.martinez@aol.com | 1 | |||||
| 35 | 1307 | Nathan | Brooks | nbrooks94@gmail.com | St. Louis | MO | St. Louis | MO | nbrooks94@gmail.com | 1 | |||||
| 36 | 1313 | William | Baker | wbaker@bluecedarhomes.com | St. Louis | MO | St. Louis | MO | wbaker@bluecedarhomes.com | 1 | |||||
| 37 | 1472 | Richard | Jimenez | rjimenez73@gmail.com | St. Louis | MO | St. Louis | MO | rjimenez73@gmail.com | 1 | |||||
| 38 | 1544 | Caleb | Bailey | cbailey10@icloud.com | Kansas City | MO | Kansas City | MO | cbailey10@icloud.com | 1 | |||||
| 39 | 1556 | Melissa | Mendoza | mmendoza@evergreenproperties.com | St. Louis | MO | St. Louis | MO | mmendoza@evergreenproperties.com | 1 | |||||
| 40 | 1563 | Debra | Jimenez | djimenez29@gmail.com | Kansas City | MO | Kansas City | MO | djimenez29@gmail.com | 1 | |||||
| 41 | 1587 | Olivia | Sullivan | olivia.sullivan@outlook.com | Kansas City | MO | Kansas City | MO | olivia.sullivan@outlook.com | 1 | |||||
| 42 | 1711 | Brooke | Richardson | brookerichardson1980@hotmail.com | St. Louis | MO | St. Louis | MO | brookerichardson1980@hotmail.com | 1 | |||||
| 43 | 1761 | Brenda | Harris | bharris64@icloud.com | St. Louis | MO | St. Louis | MO | bharris64@icloud.com | 1 | |||||
| 44 | 1894 | Stephen | Long | stephen.long@gmail.com | Kansas City | MO | Kansas City | MO | stephen.long@gmail.com | 1 | |||||
| 45 | 1951 | Michael | Mendoza | mmendoza84@outlook.com | Kansas City | MO | Kansas City | MO | mmendoza84@outlook.com | 1 | |||||
| 46 | 1994 | Dennis | Long | dennislong1975@gmail.com | St. Louis | MO | St. Louis | MO | dennislong1975@gmail.com | 1 | |||||
| 47 | 2006 | Edward | Russell | edwardrussell1996@gmail.com | St. Louis | MO | St. Louis | MO | edwardrussell1996@gmail.com | 2 | |||||
| 48 | 2012 | Noah | Barnes | nbarnes@parkrowhotels.com | St. Louis | MO | St. Louis | MO | nbarnes@parkrowhotels.com | 2 | |||||
| 49 | |||||||||||||||
| 50 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Each right cell becomes a firefly in your lantern.
What Angela gets, and why
The lesson
The cleaned copy
Angela’s request is the whole chapter in one sheet. The export holds the 47 Missouri customers, in
A1:F48, exactly as the customer table has them: a city in capitals, a city with a leading space,
a state with a trailing one, and two people who have two accounts each. You will add cleaned
columns next to the raw ones and a problems column that explains every change, then count the
rows that needed one.
The rule from the start of the chapter applies: the raw columns stay untouched. Marketing gets the clean columns; you keep the trail.
Step 1: city and state
G2 =PROPER(TRIM(E2))
H2 =UPPER(TRIM(F2))
Fill both down to row 48. Spot-check the rows the export got wrong: E15 (' Kansas City') and
E19 (KANSAS CITY) both become Kansas City; E37 ('St. Louis ') becomes St. Louis;
F4 (' MO') and F35 ('MO ') become MO.
Step 2: the email key and its count
I2 =LOWER(TRIM(D2))
J2 =COUNTIF($I$2:$I$48,I2)
Here the count is a number, not TRUE/FALSE: 2 tells marketing there are two accounts behind one
person. Rows 47 and 48 are the later accounts of Edward Russell (row 10) and Noah Barnes (row 14).
Both were exported with a leading space in the email, which is exactly the case a raw COUNTIF
on column D misses.
Step 3: the problems column
Each check becomes one IF that returns a word or the empty text "":
| Piece | Returns a word when |
|---|---|
IF(EXACT(E2,G2),"","city") |
the clean city differs from the raw one in any character, case included |
IF(EXACT(F2,H2),"","state") |
the same for the state |
IF(J2>1,"duplicate","") |
the email key appears more than once |
TEXTJOIN(delimiter, ignore_empty, text1, text2, …) joins its pieces with the delimiter. With
TRUE as the second argument it skips the empty ones, so you never get ", , duplicate":
K2 =TEXTJOIN(", ",TRUE,IF(EXACT(E2,G2),"","city"),IF(EXACT(F2,H2),"","state"),IF(J2>1,"duplicate",""))
Then count the rows that have any problem at all:
N1 =COUNTIF(K2:K48,"?*")
The criteria "?*" is a wildcard pattern: ? is exactly one character and * any number of
them, so it matches any text with at least one character and leaves the empty results out. It
returns 9. TEXTJOIN exists in Excel 2019 and later, Microsoft 365 and Google Sheets. In older
Excel, join the pieces with & and wrap the result in TRIM.
Thinking like an analyst
Nine of 47 rows had something wrong, and the problems column tells marketing which and why. That makes the next question easy to answer: which copy of Edward Russell gets the invite? That is a business call (keep the account with the orders, here the original, rows 10 and 14), and the sheet makes it visible instead of making it silently.
Before you send any cleaned list, check three things:
- no clean value starts or ends with a space:
=COUNTIF(G2:G48," *")and=COUNTIF(G2:G48,"* ")should both return 0; - the duplicate rows come in pairs (here 4, an even number);
- the count in
N1matches what you expect from the raw data, so the formula didn’t flag everything or nothing.
Common mistakes
- Counting duplicates on the raw
Dcolumn: in this export it finds no duplicate at all. - Comparing with
<>in step 3:KANSAS CITYwould not be flagged, because<>ignores case. TEXTJOINwithFALSEas the second argument: the empty pieces stay and the result reads, , duplicate.- An unlocked
COUNTIFrange in step 2: rows near the bottom stop finding their pairs.
Lantern lit!
Practised: data cleaningtrimpropercountifexacttextjoin
- Solved
- No hints
- First run
