# Question for excel wizards

**URL:** https://community.glideapps.com/t/question-for-excel-wizards/11225
**Category:** Ask for Help
**Created:** [June 21, 2020, 10:29pm UTC](https://community.glideapps.com/t/question-for-excel-wizards/11225 "2020-06-21T22:29:28Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Chris\_Aram](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chris_aram/32/2157_2.png) [@Chris\_Aram](https://community.glideapps.com/u/Chris_Aram)
#### Post date: [June 21, 2020, 10:29pm UTC](https://community.glideapps.com/t/question-for-excel-wizards/11225/1 "2020-06-21T22:29:28Z")

</div>

Hi, Loving this app creator. I have a question for those with formula experience.

Heres what im looking to achieve:

I need to take a site code from user entry, lookup the code from a table in another sheet, take the related email address and add this to the email address from the user entry.

This is so my team managers can view all entries related to their sites.

Here is picture of my sheets to help explain.

 ![Sheet1](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/a/a7b4e0665e5e654c3d47acb65f13c9c6e76929dd.png)

Any help greatly appreciated. Thank you

---

<div class="post-metadata">

### Author: ![Glider](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/glider/32/9699_2.png) [@Glider](https://community.glideapps.com/u/Glider)
#### Post date: [June 21, 2020, 10:31pm UTC](https://community.glideapps.com/t/question-for-excel-wizards/11225/2 "2020-06-21T22:31:11Z")

</div>

I think @ThinhDinh can help younwith that he is awesome at formulas

---

<div class="post-metadata">

### Author: ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)
#### Post date: [June 21, 2020, 11:00pm UTC](https://community.glideapps.com/t/question-for-excel-wizards/11225/3 "2020-06-21T23:00:31Z")

</div>

Hi @Chris_Aram

**Option A: In the Glide Data Editor**

- Go to your “User entry” tab (in the Glide Data Editor).
- Create a relation column which you can call “Site codes relation”
- In “from” select “Side code”. In “with/to” select “Site codes” tab and “Sites codes” column.
- Leave multiple match unchecked.
- Create a second column which will be a lookup column: lookup the “Managers Email Address” column from the “Site codes relation” column.

If anything here is unclear, have you had at look at Glide’s documentation and videos? They are very well done.

[Relation column](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column)  
[Lookup column](https://docs.glideapps.com/all/reference/data-editor/computed-columns/lookup-column)

**Option B: Formulas in Google Sheets**  
You can use a vlookup() formula or if you want to be a little bit more fancy an index(match()) combination. For your app, I recommend you stick to the Glide Data Editor as this is good practice. Your app aside, it won’t hurt if you play around with vlookup and index-match, those two formulas are useful.

The relation+lookup combo in the GDE allows you to do an index+match in GS. Whenever possible, you should process data in the GDE rather than in GS to reduce lag.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [June 21, 2020, 11:42pm UTC](https://community.glideapps.com/t/question-for-excel-wizards/11225/4 "2020-06-21T23:42:46Z")

</div>

Hi Chris, I would advise you to follow @nathanaelb’s method A to do it inside the Glide Data Editor, as we don’t want the lag when the data has to be synced back and forth between Glide & Sheets.

If you still want to store that value inside your sheets, then the right arrayformula to put in the first cell of email column (row 1) would be:

```
={"Email address";ARRAYFORMULA(IF(D2:D<>"",VLOOKUP(D2:D,'Site Codes'!A2:B,2,FALSE),""))}
```

---

<div class="post-metadata">

### Author: ![Chris\_Aram](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chris_aram/32/2157_2.png) [@Chris\_Aram](https://community.glideapps.com/u/Chris_Aram)
#### Post date: [June 22, 2020, 9:18pm UTC](https://community.glideapps.com/t/question-for-excel-wizards/11225/5 "2020-06-22T21:18:07Z")

</div>

Thanks, ive tried this but i cant get the array to then work to get both email address into one box to then make the row owner??

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [June 22, 2020, 11:01pm UTC](https://community.glideapps.com/t/question-for-excel-wizards/11225/6 "2020-06-22T23:01:51Z")

</div>

If you need 2 emails to become row owner you must make it an Array column. Name them Email 1, Email 2, …

---

<div class="post-metadata">

### Author: ![Chris\_Aram](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chris_aram/32/2157_2.png) [@Chris\_Aram](https://community.glideapps.com/u/Chris_Aram)
#### Post date: [June 22, 2020, 11:11pm UTC](https://community.glideapps.com/t/question-for-excel-wizards/11225/7 "2020-06-22T23:11:10Z")

</div>

But you cant make a lookup column part of an array with glide, that i can work out any way. So i have a list of site codes with their respective managers, i can get the relation formula to work so when an entry is made the relation looks up the relevant site and brings in the associated email address. Now i cant get this email address into the array because the column cant be renamed Email 2 for example.  
Does that make sense?

Thank you

---

<div class="post-metadata">

### Author: ![Chris\_Aram](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chris_aram/32/2157_2.png) [@Chris\_Aram](https://community.glideapps.com/u/Chris_Aram)
#### Post date: [June 22, 2020, 11:14pm UTC](https://community.glideapps.com/t/question-for-excel-wizards/11225/8 "2020-06-22T23:14:19Z")

</div>

I feel like im trying to get a moon on a stick but im sure it cant be that hard. All i want is that once a user has logged an issue, the site code is used to lookup the relevant site manager and then that site manager email address is added to the owner email cell so he can see the issue on his app.  
Maybe im trying to go about it the wrong way but thats what im trying to achieve.

Thanks

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [June 22, 2020, 11:24pm UTC](https://community.glideapps.com/t/question-for-excel-wizards/11225/9 "2020-06-22T23:24:24Z")

</div>

If the lookup column in Glide doesn’t work as you say then make it in Sheets and use the Arrayformula I gave you above. Make sure you position them next to each other so it can become an Array column.

---

<div class="post-metadata">

### Author: ![Chris\_Aram](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chris_aram/32/2157_2.png) [@Chris\_Aram](https://community.glideapps.com/u/Chris_Aram)
#### Post date: [June 25, 2020, 8:20am UTC](https://community.glideapps.com/t/question-for-excel-wizards/11225/10 "2020-06-25T08:20:18Z")

</div>

thanks, the problem ive found with setting this up in sheets is that when the app enters a new line of data the lookup formula doesn’t copy to the next line?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [June 25, 2020, 8:22am UTC](https://community.glideapps.com/t/question-for-excel-wizards/11225/11 "2020-06-25T08:22:21Z")

</div>

What does it return there? The ARRAYFORMULA will be automatically calculated for all lines.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [June 25, 2020, 11:56am UTC](https://community.glideapps.com/t/question-for-excel-wizards/11225/12 "2020-06-25T11:56:38Z")

</div>

Just curious why the need for row owner. Is the data sensitive enough that you need the security of row owner? Or would it be easier to just use @nathanaelb’s first method and simply filter each email column against ‘signed in user’ individually instead of as an array. I’m only asking because it seems like we are taking a complicated route to filter data using the more secure ‘row owner’ when fingering would be enough. Unless you are trying to ensure nobody else will ever be able to see the data other than the user and the manager.
