Ravindra BagaleCourses & study guides मराठी Track your progress

5. Data Cleaning A–Z

Excel

5.11 E-mail Addresses

Clean an email field without guessing a mailbox

A support team preparing a returns report receives email fields from two source systems. Some values have spaces around them, one domain is written with uppercase letters, and one field has two at signs. A formula that lowercases the whole field and removes every space would make some rows look neat. It can also change a mailbox identifier or cover up a source error the team still needs to resolve.

Use fictional retail support data inspired by familiar shopping services such as Amazon Now and Blinkit. All example domains ending in .example are reserved for documentation. The people are synthetic, and no message is sent. We will preserve the raw text, separate the local and domain parts and classify each row under a deliberately small rule for this exercise.

  • Keep the original field. Retain it beside the candidate and source ID.
  • Separate the two address parts. Locate the separator only after checking the input shape.
  • Normalise the intended part. For the sample's ASCII domains, lowercase the domain while preserving the exact local part.
  • Review exceptions and scope. Keep unsupported formats, uncertain identity and business eligibility in their own categories.

Read the local part and domain as separate inputs

In the ordinary example Maya.K@Shop.Example, the text before the at sign is the local part. The text after it is the domain. The domain identifies a mail naming context. The meaning of the local part is controlled by the destination system. Preserve periods, plus signs and case unless the authoritative source supplies a more specific interpretation.

The fictional address Maya.K at Shop.Example is split into local part Maya.K and ASCII domain Shop.Example. The candidate keeps Maya.K and changes the domain to shop.example.
Lowercasing an ASCII domain and lowercasing the local part are different transformations.

Preserve local-part spelling and case

Mail systems commonly accept some local-part variations, but the SMTP standard requires preserving local-part case. A processing rule that sends Maya.K and maya.k to one lowercase candidate can merge values that the receiving system is allowed to distinguish. Keep both raw and preserved values. A separate confirmed provider or organisation rule can tell you when two spellings represent the same actual mailbox.

For the simple ASCII domains in the exercise, domain case is not significant. The candidate uses Maya.K@shop.example after lowercasing only Shop.Example. If an organisation works with internationalized domains or local parts, it needs an appropriate source-system policy. A blanket removal of non-ASCII characters can destroy a meaningful address.

Keep punctuation inside the local part

The example Ops+returns@HELP.EXAMPLE has the local text Ops+returns. Preserve the plus and the text after it. A mail provider may recognise certain tags, dotted variants or aliases in a particular configuration. That is a provider or mailbox rule. Removing dots or tags across every address assumes facts a worksheet does not know.

Which characters change in Maya.K@Shop.Example?

Only the ASCII domain becomes lowercase under the practice rule. Maya.K stays exactly the same. Lowercasing the whole field might change a local part that the destination system distinguishes.

Define a small review rule for the expected file

The first exercise is restricted to a source that claims to contain ordinary unquoted addresses with simple dot-separated domains. A candidate should have exactly one at sign, visible characters on both sides, no ordinary spaces after cleanup, and a dot inside a nonempty domain label sequence. The exercise uses one set of simple fixture statuses. Those checks do not implement the full email standards or prove that an address is usable.

Know when the source is outside the exercise rule

Email standards include syntax beyond the ordinary rows shown here, such as some quoted local parts and domain literals. Internationalized addresses use additional support and rules. A workbook expected to contain display names like Maya <Maya.K@shop.example> also needs to distinguish the human-readable name from an address. Route those cases to an appropriate source-system parser or review process. A failed rule in our exercise means the string does not meet this particular workflow's expected pattern.

Check obvious conditions before extracting

Count at signs by comparing the original candidate length with the length after removing every at sign. Only when the count is exactly one should you use FIND to locate it. In a missing-at case, FIND would fail. In a two-at case, reading the first location would not prove which part is intended. After finding one position, check that the left and right parts are both nonempty.

Use a domain dot check only as one requirement of a chosen data contract. A value like staff@intranet fails our exercise's dotted-domain rule. A worksheet cannot conclude its underlying organisational address is impossible. Similarly, a visible dot says nothing about where the domain is hosted or whether it accepts mail.

Does a passing rule confirm the user owns the mailbox?

No. It means the text met the spreadsheet's defined pattern. Ownership, contact permission, address existence and delivery all need separate evidence from the correct process.

Remove surrounding spaces while preserving evidence of internal errors

A copied source field can have an ordinary space before or after the characters you want. It may also contain a nonbreaking space from a web page. In the lab, replace known nonbreaking spaces with ordinary spaces, then apply TRIM in a helper column. This gives you comparable text to inspect and leaves the original untouched.

Flag internal spaces instead of joining fragments

TRIM removes surrounding ordinary spaces and compresses repeated ordinary spaces within text. The sample then checks whether an ordinary space still appears anywhere in the candidate. It deliberately flags an internal space. Turning first last@shop.example into firstlast@shop.example would create a different string and guess the intended recipient.

Compare an input that merely has surrounding spaces with one that has a space inside the domain of the candidate. An outer-space rule can clean the first. The second needs source review. Preserve the raw value and a status so the owner can see the actual issue. Do not add a missing at sign, dot or character based on what appears likely.

Can trimming reliably identify what the missing text was supposed to be?

No. It can remove known formatting characters under a defined contract. When a character appears to be missing inside an address, keep the supplied string and request the authoritative value.

Trace one address from raw field to candidate

  1. Preserve the raw value

    Keep the original fictional Maya.K@Shop.Example alongside EM-01. The apparent edge spaces are present in this fixture.

  2. Prepare a review candidate

    Remove the approved outer formatting through the sample whitespace rule. Confirm the helper contains one at sign and characters on both sides.

  3. Normalise the domain only

    Extract the local part Maya.K and the domain Shop.Example. Lowercase the ASCII domain and rejoin the parts. The candidate is Maya.K@shop.example.

  4. Record what you verified

    The candidate meets the simple practice shape. Keep the raw record and the actual status. It does not establish ownership or delivery.

Lab 1 · Split ordinary addresses and classify ten records

Goal. Separate whitespace cleanup, parsing, shape review and candidate construction. Add an editable scratch worksheet called Email Shape. Format the blank raw-text column B as Text before entering the source data. Put Record, Raw, Candidate Text, At Count, At Position, Local, Domain, Status and Reviewed Candidate in A1:I1.

Email Shape inputs and expected candidate decisions
RecordRaw fixtureStatusReviewed candidate
EM-01Maya.K@Shop.Example with outer spacesMatches practice shapeMaya.K@shop.example
EM-02Ops+returns@HELP.EXAMPLEMatches practice shapeOps+returns@help.example
EM-03no-at.exampleReview @ countEmpty display
EM-04double@@shop.exampleReview @ countEmpty display
EM-05@shop.exampleReview empty partEmpty display
EM-06first last@shop.exampleReview spaceEmpty display
EM-07staff@intranetReview domain shapeEmpty display
EM-08Leave blankMissingEmpty display
EM-09Carla@market.example with a leading nonbreaking spaceMatches practice shapeCarla@market.example
EM-10sales@Review empty partEmpty display
  1. Build the raw fixture. Put the records in A2:B11. For EM-01 include at least one ordinary outer space. For EM-09 use =UNICHAR(160)&"Carla@market.example" in B10. Set B10 to General before typing that fixture formula so it can evaluate to text. If your edition cannot use UNICHAR, use an ordinary leading space and note which case you tested.
  2. Clean the expected formatting and count separators. Enter C2 and D2 from the formula list and copy both down. Compare the at count in EM-03 and EM-04. Expect 0 and 2. A valid unquoted fixture has exactly one.
  3. Find and split a known separator. Enter E2:G2 from the formula list. E is zero for fixtures without exactly one at sign. F and G extract the parts only when the position is present. EM-05 proves an at sign can be present while a part is empty.
  4. Review the simple domain pattern and internal space. Enter H2. It checks the required basic parts and the intended domain shape. It rejects leading or trailing dots and consecutive dots within the practice domain. It is a small audit check. It does not check every character and rule of the email standards.
  5. Build a candidate only after the checks pass. Enter I2 and fill down. Lowercase the supported ASCII domain, preserve the local text and keep nonpassing cases visible in H. Expect three candidate strings and seven records without one, including the missing row.
C2 =TRIM(SUBSTITUTE(B2,UNICHAR(160)," "))
D2 =LEN(C2)-LEN(SUBSTITUTE(C2,"@",""))
E2 =IF(D2=1,FIND("@",C2),0)
F2 =IF(E2>0,LEFT(C2,E2-1),"")
G2 =IF(E2>0,MID(C2,E2+1,LEN(C2)),"")
H2 =IF(C2="","Missing",IF(D2<>1,"Review @ count",IF(OR(F2="",G2=""),"Review empty part",IF(ISNUMBER(FIND(" ",C2)),"Review space",IF(AND(ISNUMBER(FIND(".",G2)),LEFT(G2,1)<>".",RIGHT(G2,1)<>".",NOT(ISNUMBER(FIND("..",G2)))),"Matches practice shape","Review domain shape")))))
I2 =IF(H2="Matches practice shape",F2&"@"&LOWER(G2),"")

Verify and recover. If no-at fixtures produce an error in the part columns, inspect the E position guard before calling FIND on those rows. If the raw case of Maya.K changes in F, check which stage lowercased it. Preserve the raw and reviewed fields. If substituting an ordinary space for the UNICHAR fixture, use =TRIM(B2) in C and leave the nonbreaking-space case outside that edition's exercise.

Lab 2 · Reconcile domain scope and potential duplicates

Goal. Use two approved example domains for a report, preserve the local part and count exact candidate matches. Add a sheet named Email Review with Record, Raw, Local, Domain, Pattern Status, Report Status and Reviewed Candidate in A1:G1. The input table consists of simple fictional shapes plus one missing record. For these known ordinary test strings, use the same split and shape steps from Lab 1 in spare columns or prepare the parts manually first.

Prepared data for the fictional report policy
RecordRawReviewed candidateReport status
EC-01Maya.K@Shop.ExampleMaya.K@shop.exampleIn scope
EC-02Maya.K@shop.exampleMaya.K@shop.exampleIn scope
EC-03maya.k@shop.examplemaya.k@shop.exampleIn scope
EC-04Maya.K+receipts@Shop.ExampleMaya.K+receipts@shop.exampleIn scope
EC-05MayaK@Shop.ExampleMayaK@shop.exampleIn scope
EC-06maya.k@help.examplemaya.k@help.exampleIn scope
EC-07maya.k@outside.exampleEmpty displayOutside report scope
EC-08Leave blankEmpty displayReview input
  1. Prepare or copy the parts. Fill C and D with the local and domain text from the approved simple split. Use the exact label Matches practice shape in E for the seven simple candidate rows and Missing for EC-08. In this lab keep the full raw string and the original domain case in the source columns.
  2. Check only the named domains. In F2 use the first formula below and fill through F9. The report includes shop.example and help.example. Check that outside.example can have a normal string shape while being excluded from this report.
  3. Build the report's candidate field. In G2 enter the second formula, then fill down. This is a limited report helper. It supplies a candidate when the input shape and scope qualify. Keep excluded and missing rows in A:F for reconciliation.
  4. Identify exact full-text review groups. In H2 use the third formula and fill down. Expect 2 on EC-01 and EC-02. EC-03 remains a distinct string with count 1 because the workbook compares local case with EXACT. The plus tag and punctuation also remain significant in this file.
  5. Verify the totals. Eight source records produce six in-scope candidate rows, one outside-scope row and one review row. There are five distinct candidate strings among the six rows. Count all eight source records for a reconciliation. Decide separately how an organisation should investigate repeated route information.
F2 =IF(E2<>"Matches practice shape","Review input",IF(OR(LOWER(D2)="shop.example",LOWER(D2)="help.example"),"In scope","Outside report scope"))
G2 =IF(F2="In scope",C2&"@"&LOWER(D2),"")
H2 =IF(G2="","",SUMPRODUCT(--EXACT($G$2:$G$9,G2)))

Verify and recover. If EC-03 is counted with EC-01, check whether you applied LOWER to the whole value or used a case-insensitive comparison in the candidate group. If outside.example is labelled Review input, compare the pattern stage's result with the separate report rule. Save or close the scratch workbook after restoring the fixtures.

Keep three different review levels separate

The first check is a text pattern, the second is whether a domain belongs in the current report, and the third is independently verifying contact ownership or delivery.
The result of one stage cannot answer a question belonging to another stage.

Name the actual evidence available to the team

  • Pattern matches. The reviewed string meets the exercise's expressly defined checks.
  • In reporting scope. A reviewed business rule includes this example domain or source group. A different report could select another group.
  • Verified contact state. Any conclusion about permission, mailbox ownership or delivery must come from an appropriate verified source and process.

Do not infer that a contact exists from a domain label, and do not infer the sender's identity from its apparent naming. Spreadsheet formulas can classify text and prevent known formatting mistakes. Keep external verification statuses separate. The reserved names in this lesson are suitable for demonstrating that distinction because they are only examples.

Check exact domain membership before changing report scope

Suppose an analyst adds a support-domain filter. A search for the text shop.example anywhere in the address can match the local part, a longer domain or a string that only resembles an allowed domain. Extract the actual domain first. Then compare the entire domain with the current approved value. It is the report owner's choice whether to include a narrow list, a broader documented set, or every domain from the verified source.

Test positive and deliberately similar negative cases

Compare the named domain rule with an optional subdomain rule
Extracted domainExactly shop.exampleShop domain or its subdomain
Shop.ExampleYes after ASCII case normalisationYes
orders.shop.exampleNoYes
notshop.exampleNoNo
shop.example.other.exampleNoNo
help.exampleNoNo

For the first column the check is =LOWER(D2)="shop.example" after extracting an approved simple ASCII domain into D. For the broader exercise rule, use =OR(LOWER(D2)="shop.example",RIGHT(LOWER(D2),LEN(".shop.example"))=".shop.example"). The leading dot in the suffix test distinguishes a separated name such as orders.shop.example from notshop.example. Apply this only to reviewed domain input under the stated policy. It gives no evidence of common mailbox ownership or authorisation.

Check the definitions before updating reports

In Lab 2 a report allowed shop.example and help.example exactly. A new report might explicitly add outside.example. That change would include EC-07 and increase in-scope rows from six to seven. The missing row remains in Review input. Six candidate strings would then be distinct. Record the approved scope change before comparing the new counts with the original report. The same address text can have two classifications for two different report definitions.

Probe what the simple shape formula does and where it stops

The Lab 1 contract expects an ordinary unquoted form. A few structural checks help catch recurring export mistakes, and they are still a small subset of what a professional address parser checks. Add selected negative and boundary controls in a separate area. Give them synthetic IDs so you can tell which outcomes come from the teaching formula and which require a separate source rule.

Check each failure against a concrete input

Narrow practice policy, applied to ordinary ASCII examples
ExampleFirst resultEvidence to inspect
Reader@shop..exampleReview domain shapeTwo adjacent dots within the domain.
Reader@.shop.exampleReview domain shapeA leading dot creates an empty label.
Reader@shop.example.Review domain shapeA trailing dot fails this exercise contract.
Reader@shop .exampleReview spaceAn internal space needs review.
Ops+receipts@Outlet-7.ExampleMatches practice shapeThe local tag and the domain's hyphen stay intact.
reader@shop.exampleMatches practice shapeControl for the intended simple format.

For the plus-tag case, expect Ops+receipts@outlet-7.example in the candidate column. This demonstrates that the teaching rule keeps punctuation when it has a possible meaning. In the space example, a blanket remove-spaces rule could produce an ordinary-looking candidate. Lab 1 holds that row because it has no confirmed reason to join the pieces.

Route a different address format to the right process

A file can contain an internationalized local part or a display-name wrapper. A simple pattern may accept some such strings and reject others without understanding them. Ask the system owner which formats are allowed. If the spreadsheet is only meant to prepare the simple contract, keep other formats as reviewed exceptions. An explicitly supported international mail workflow should retain its Unicode information rather than removing characters merely to fit an ASCII exercise.

Look at the separate helper columns when a test fails. Compare the At Count, At Position, Local and Domain outputs with the raw fixture. If several checks fail at once, the formula reports the first condition in its documented sequence. Other conditions can still require review. For a larger workflow keep separate Boolean flags for the issues the source team needs to fix together.

Distinguish exact text, a possible alias and a duplicate record

One input can help identify a possible repeat in a file. It cannot by itself tell whether two rows represent the same person, the same event or the same import. A support system can have many requests from one mailbox. A team might also share a generic role address such as Ops@shop.example. These are legitimate ways for a contact route to appear more than once. Keep the source event ID when counting records.

Measure the impact of changing the comparison

Lab 2 has six in-scope candidate rows and five distinct exact candidates. Compare EC-01 and EC-03 using EXACT and confirm they differ. In a separate scratch column apply LOWER to every full candidate for demonstration, and compare again. They now look identical. Under this broader comparison there are four distinct strings, rather than five. That count changed because the comparison rule changed. It gives no new information about whether the two original addresses route to the same mailbox.

Return to the original formula and compare case-preserved text for this lesson. A general spreadsheet text count can apply case-insensitive comparisons. Use an explicitly case-sensitive function such as EXACT when that distinction is part of the exercise. A count of two exact matches tells you which routes to review. It leaves both source records intact.

Record the rule for known aliases

If an organisation confirms a provider-specific alias mapping, document its source and scope. Keep the original address and identify what the alias represents. A mapping approved for one domain should not be applied across all domains. Test at least one accepted variant and one distinct mailbox string that must remain separate. Do not freely strip plus tags or remove dots based on examples from another service.

When reviewing a customer list, use a verified account or event identity where the business needs counts of people or tickets. An email can be a contact attribute of that record. Check both the repeat-address count and the original record count before removing anything from an import. A count of addresses and a count of customers can each be internally correct while measuring different populations.

Build a domain summary without disclosing full addresses

The manager only needs counts of records under each known example domain. A summary can show shop.example with five in-scope rows and help.example with one. It can also show one outside-scope row and one review row. Keep the detailed candidate fields in the restricted source workbook. The reporting copy can describe the scope and counts without including raw addresses or local identifiers.

Choose a summary unit before counting

In a spare helper column of Lab 2, for example I, put =IF(F2="In scope",LOWER(D2),"") on row 2 and fill down through row 9. Then use =COUNTIF(I2:I9,"shop.example") and the equivalent help.example check. Counting the exact normalised domains in this particular column measures candidate rows. It includes the two records that produce the same exact text in EC-01 and EC-02. A distinct-route measure would produce a different number in shop.example.

Cross-check the arithmetic. Five plus one gives six in-scope rows. Adding the outside-scope count of one and the Review input count of one reproduces the original total of eight. If the numbers do not add up, check whether a source row was dropped, an extra category appeared, or a formula range stopped before the last row. A report that reconciles is easier to audit after the next import.

Use a mask as a display choice only

In an authorised troubleshooting view, a helper might show one leading local character and the example domain, such as m***@shop.example. If the actual support report only needs a count, leave even that helper out. Several source records can share an identical masked value after case formatting. It has no use as an identifier for deleting rows, and the original fields can remain in the workbook if you merely hide a column.

If the recipient needs a distribution file, build that file from the permitted summary fields. Inspect the actual contents, including other tabs and hidden fields, before sharing it. Keep the raw input in the approved restricted location. Explain when the review was made and which source rows supplied the numbers. These steps preserve the details for authorised review while keeping the shared output focused.

Test what should change after an authorised correction

Suppose the data source owner confirms the intentionally malformed EM-06 reading should be the fictional First.Last@shop.example. That is a new authoritative value in the exercise. Removing the space from the old field would have produced firstlast, so it would not reproduce this correction. Record the newly confirmed string separately and keep the previous input available for comparison.

Distinguish a source correction from a new cleanup rule

In a scratch copy, set the reviewed input for EM-06 to the newly confirmed address and rerun the Lab 1 steps. It now has one at sign, nonempty parts and an ordinary domain. The candidate preserves First.Last and outputs First.Last@shop.example. The number of source records remains ten. The prepared candidate count rises from three to four, and the number of unprepared records falls from seven to six.

Check a remaining exception as a control. EM-04 still has two at signs, so it should keep Review @ count. EM-08 still has no input and stays Missing. This pair of checks confirms a correction to one record rather than a broad change that hid every malformed case. Attach the source confirmation and review timestamp where your actual process records revisions.

For future exports, ask for the corrected field at the source. If an approved import rule can resolve an outer formatting pattern, record the rule and test it on both clean and deliberately malformed values. If the source cannot confirm an individual address, keep the record in review with a clear reason. That is a usable outcome for the data team even when a complete candidate cannot be produced. Give that team the record ID, the failed check and the exact source field through the approved review process. A person looking at a summary should see how many cases are still unresolved. They may have no need to see the addresses those cases contained. Keep each source count visible.

Detect tabs and line breaks without joining text fragments

A source field copied from a web page or an internal ticket can contain a character that is hard to distinguish in the grid. Ordinary spaces and nonbreaking spaces already have defined checks in Lab 1. A tab or a new line is different. TRIM handles ordinary space characters. If your source is expected to contain no embedded control characters, test for the specific ones you know can occur and route those records for review.

Build a small reproducible character test

In a disposable sheet create ="First"&UNICHAR(9)&"Last@shop.example" as a tab fixture and a second using UNICHAR(10) to put a line break at the same position. Compare both with the clean control First.Last@shop.example. Inspect the raw field with the formula bar and length. A normal-looking display does not mean the cell contains the same characters.

For a tested edition with UNICHAR and a candidate in C2, use =OR(ISNUMBER(FIND(UNICHAR(9),C2)),ISNUMBER(FIND(UNICHAR(10),C2)),ISNUMBER(FIND(UNICHAR(13),C2))). This tests for tab, line feed and carriage return. It returns TRUE for each of the deliberately inserted fixtures and FALSE for the clean control. This is an optional extra shape gate when those characters make sense for the source. It does not scan for every unseen Unicode character.

Resolve the source issue before publishing the candidate

Once a field includes an unexpected internal control character, review the original rather than removing it by default. Deleting a separator from First and Last could produce firstlast. The correct confirmed mailbox in the earlier exercise used a dot. Test any approved conversion on a clean control and a deliberate malformed string. Keep the raw input and the conditional review flag through the import process.

Identify whether quotes belong to the file format or the address

A file with comma-separated values can wrap a text field in double quotes as part of its CSV representation. An importer normally interprets such boundaries when it reads the data into a cell. A quote can also be part of the actual field. Inspect a sample after import before deciding to trim any quote characters. Copying directly from a raw file into one cell can leave the file's delimiters in a value that is supposed to contain only an address.

Check the field as it arrives in Excel

Use a synthetic CSV record with a record ID and a known test address. If the import yields Maya.K@shop.example, the CSV field delimiters have already served their purpose. If the source field instead contains a full display label with angle brackets or literal quotes, it needs a different parser for that field type. Preserve the raw value and ask the source owner which representation the import should receive.

Read one expected record after processing. Check that its email field contains only the intended text and that the next raw field did not shift into it. A formula for splitting at signs cannot repair the wrong delimiter at the file-import stage. Compare the source column count and sample identifiers with the worksheet before filling a cleanup rule down many rows.

Keep different import contracts traceable

If two files have different conventions, label the source system for each row. Use verified rules for each file before combining the candidates. A transformation that is safe on an ordinary address list may be inappropriate on a general message export. Confirm the original row count and expected candidate count after each source transformation. This tells you which file introduced an exception when the combined report changes.

Build the import check with two controlled files when possible. Give each file a known record ID and a deliberately different field representation. After import, identify which source supplied each row. Compare the cell value with the expected parsed field before applying the shared review rules. If a future export changes its delimiters, that control helps you find the issue at the import step.

A quoted email field imports as plain cell text with no quote marks. Was part of the address lost?

Check the source representation. The quotes may be CSV field boundaries. A correct parser interprets those delimiters. If quotes were intentionally present as actual address data, compare with the documented field and route it through the appropriate workflow.

Test three extensions of the rules

  1. Compare two local spellings. Use Team@shop.example and team@SHOP.EXAMPLE. Check. The domain normalises to the same string while the local parts remain different under exact comparison.
  2. Catch an internal space. Try a fixture with a space directly before the domain's dot. Check. The shape reviewer flags the space. Do not join the pieces without authoritative source correction.
  3. Reconcile the scope decision. Add a syntactically ordinary address with a new restricted example domain to a scratch copy. Check. The domain can pass the simple pattern but still be outside the two named report domains.

Check your understanding

1. Which part of Maya.K@Shop.Example should the practice formula lowercase?
  • A. The ASCII domain only
  • B. The full string
  • C. The local part only

Answer A. The exercise uses a normalised ASCII domain and keeps the local part unchanged. The SMTP rules allow local-part case distinctions.

2. A field has two at signs and the source promises ordinary unquoted addresses. What should you do?
  • A. Remove the second at sign
  • B. Flag the pattern for review
  • C. Treat the first piece as the whole address

Answer B. The shape falls outside the expected contract. Cutting or replacing the characters would invent an address without source evidence.

3. Which pair is an exact repeated candidate in Lab 2?
  • A. EC-01 and EC-03
  • B. EC-04 and EC-05
  • C. EC-01 and EC-02

Answer C. They differ only in the case of the original ASCII domain and retain the same local text. EC-03 has a different preserved local part case.

4. What does the pattern outcome tell you about deliverability?
  • A. A pattern match is only string evidence
  • B. Every matching row can receive mail
  • C. Every dotted domain accepts messages

Answer A. The check applies a declared set of string rules. The spreadsheet has no independent delivery or ownership evidence in this exercise.

5. Should a domain outside the allowed report list be labelled a malformed address?
  • A. Yes, because it was excluded
  • B. No, reporting scope is a different check
  • C. Yes, unless its local part contains a dot

Answer B. Exclusion tells you the report's scope did not include the domain. The same string can pass the pattern check.

6. Where can you inspect the original punctuation and surrounding spaces?
  • A. Only in the lowercased domain
  • B. Only in a dashboard label
  • C. In the preserved raw field alongside the source ID

Answer C. Raw evidence lets you explain every deliberate formatting transformation and recover the input if a rule changes.

Interview questions with worked answers

How do you clean an imported email column?

I keep a raw text column and define the input contract. Then I remove permitted outer formatting in a helper, check the separator, split the parts and assign a specific review status. For the supported ASCII domain I can normalise case while keeping the local part exactly as provided.

Why might removing every space damage data?

It can merge pieces that came from a misentered address or an unrecognised representation. I remove known surrounding formatting and preserve the raw field. An unexpected internal space goes to review unless the source gives a safe documented conversion.

What does a spreadsheet syntax check prove?

It checks its own declared pattern. I separate that outcome from scope, existence, ownership, consent and delivery. The sample uses reserved example domains so even a shape pass is clearly an exercise outcome.

How do you decide whether two cleaned addresses are duplicates?

I compare the approved candidate representation, preserving local case where the source has no verified rule to change it. An exact match flags the text for review. It is not independent proof of a duplicate person or record.

How do you make the report auditable?

I retain source IDs, raw text, candidate and statuses, then reconcile total rows and each review category. I test known good, missing, malformed and outside-scope cases. The shared summary includes the minimum fields necessary to explain those controls.

Quick recall cards

  • Local part

    Keep the part before the separator intact unless an authoritative rule proves a specific change.

  • ASCII domain

    Normalise its case under the reviewed policy while keeping the raw text available.

  • Separator check

    Verify the expected pattern before extracting individual parts from an ordinary unquoted address.

  • Internal spaces

    Flag unexpected positions so review can resolve the real source value.

  • Scope check

    A domain can be outside a report's list without its string failing the format check.

  • Verification

    Shape is a string property. Ownership and delivery need their own evidence.

The following lesson handles PIN codes and other numeric-looking identifiers. Bring forward the practice of preserving the raw text. A format rule should never silently add or remove characters that are needed to distinguish records.

Official references

Continue practising: explore the existing Excel Task Hub for additional exercises.