@jordan_nest
Using your example, there are 6 rows shown in the screenshot.
When the GSheet Lookup Rows step runs it will return 6 rows.
You need to pass the necessary GSheet data points (Locations, Email) into the Code step.
You also need to pass the Location from the Typeform into the Code step.
That way the Code step has the Location info from the Typeform and the Location/Email info from the GSheet.
Now the Code can be configured to first use the Typeform Location to derive the matching GSheet Locations/Emails. (e.g. from 6 possibilities to 3 possibilities)
Then the Code can be configured to do deduplication. (e.g. from 3 to 1)
The data returned from the Code step would be the 1 email that needs to be processed thru the Looping step.
Each unique item processed the the Looping step would then be sent an email.