# Using ImportRange to Export Emails in App:Logins to Another Google Sheet

**URL:** <https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695>\
**Category:** Ask for Help\
**Created:** [July 18, 2020, 12:04am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695 "2020-07-18T00:04:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![spencerb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spencerb/32/4486_2.png) [@spencerb](https://community.glideapps.com/u/spencerb)\
**Post date:** [July 18, 2020, 12:04am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/1 "2020-07-18T00:04:53Z")

</div>

Hey Gliders, is there a way to export emails logged within the App:Logins tab to another Google Sheet via the IMPORTRANGE function. I can’t seem to get it to work, and I think it’s because there’s that colon in the name of the tab.

Thanks for your help!

---

<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:** [July 18, 2020, 12:13am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/2 "2020-07-18T00:13:09Z")

</div>

Something like this should work.

`={'App: Logins'!A:A}`

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david/32/62831_2.png) [@david](https://community.glideapps.com/u/david)\
**Post date:** [July 18, 2020, 12:14am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/3 "2020-07-18T00:14:35Z")

</div>

@ThinhDinh be like

![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/6/667035b4540e0547442dda5c382b49b9150dd7b0.gif)

---

<div class="post-metadata">

**Author:** ![spencerb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spencerb/32/4486_2.png) [@spencerb](https://community.glideapps.com/u/spencerb)\
**Post date:** [July 18, 2020, 12:29am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/4 "2020-07-18T00:29:45Z")

</div>

Ahhhh, the space after the colon. Excellente! Thanks so much!

---

<div class="post-metadata">

**Author:** ![spencerb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spencerb/32/4486_2.png) [@spencerb](https://community.glideapps.com/u/spencerb)\
**Post date:** [July 18, 2020, 12:37am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/5 "2020-07-18T00:37:09Z")

</div>

For anyone who wants a unique list of emails from their App:Logins tab, just plug in this nifty code into another Google Sheet. Be sure to replace the sheet URL with your unique url for your sheet.

```
=unique(importrange("https://docs.google.com/spreadsheets/d/thisisfake1Tiihtmufakeueoc8UPos7tesQXSNfakepq7ePzfakePy0gmjBZfk/","App: Logins!B2:B"))

```

Have a great weekend everyone!

---

<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:** [July 18, 2020, 12:55am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/6 "2020-07-18T00:55:01Z")

</div>

If you’re getting it to another sheet within the same file:

```
=unique(filter('App: Logins'!B2:B,'App: Logins'!B2:B<>"")
```

---

<div class="post-metadata">

**Author:** ![SantiagoPerez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/santiagoperez/32/16807_2.png) [@SantiagoPerez](https://community.glideapps.com/u/SantiagoPerez)\
**Post date:** [July 20, 2020, 4:31am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/7 "2020-07-20T04:31:59Z")

</div>

Hey @Thinh@spencerb

I am trying to copy the info from the App: Sales (the one generated by Stripe) tab to another tab within the same file, so glide can see it. Do you know about any formulas that I could use?

Thanks guys!

---

<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:** [July 20, 2020, 4:37am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/8 "2020-07-20T04:37:59Z")

</div>

You can use the same method as above, just replace the ‘Logins’ part by the ‘Sales’.

---

<div class="post-metadata">

**Author:** ![SantiagoPerez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/santiagoperez/32/16807_2.png) [@SantiagoPerez](https://community.glideapps.com/u/SantiagoPerez)\
**Post date:** [July 20, 2020, 4:44am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/9 "2020-07-20T04:44:33Z")

</div>

I tried this one but it only brought back a name. How do I change it to get all the info?

> [@ThinhDinh](#):
>
> `=unique(filter('App: Logins'!B2:B,'App: Logins'!B2:B<>"")`

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/f/f74de233d518cafaa17dcc9e52487e4936ea348c.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/b/b4e74ea4a2ab76d76063c1c2d7a0961898aaa708.png)

---

<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:** [July 20, 2020, 4:46am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/10 "2020-07-20T04:46:22Z")

</div>

```
=unique(filter('App: Sales'!A1:N,'App: Logins'!A1:A<>"")
```

---

<div class="post-metadata">

**Author:** ![SantiagoPerez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/santiagoperez/32/16807_2.png) [@SantiagoPerez](https://community.glideapps.com/u/SantiagoPerez)\
**Post date:** [July 20, 2020, 4:48am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/11 "2020-07-20T04:48:43Z")

</div>

It worked really well!

> [@ThinhDinh](#):
>
> `=unique(filter('App: Sales'!A1:N,'App: Logins'!A1:A<>"")`

Thanks!

---

<div class="post-metadata">

**Author:** ![spencerb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spencerb/32/4486_2.png) [@spencerb](https://community.glideapps.com/u/spencerb)\
**Post date:** [July 29, 2020, 10:30pm UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/12 "2020-07-29T22:30:32Z")

</div>

Do you know how I could accomplish this with IMPORTRANGE? I’m needing to bring this into an entirely separate Google Sheet file. What I have above works right now, but can’t figure out how to add in the part you gave to filter out blank ones.

Thanks for your help!

---

<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:** [July 29, 2020, 10:44pm UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/13 "2020-07-29T22:44:05Z")

</div>

It should work with this.

```
=QUERY(IMPORTRANGE("Your sheet ID","Range to import"),"SELECT * WHERE Col1 IS NOT NULL")
```

---

<div class="post-metadata">

**Author:** ![spencerb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spencerb/32/4486_2.png) [@spencerb](https://community.glideapps.com/u/spencerb)\
**Post date:** [July 29, 2020, 10:50pm UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/14 "2020-07-29T22:50:59Z")

</div>

Thanks, that works, but it’s not giving me unique instances. I tried adding UNIQUE in between QUERY and IMPORTRANGE, but it doesn’t work.

---

<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:** [July 29, 2020, 10:52pm UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/15 "2020-07-29T22:52:18Z")

</div>

You can add the UNIQUE before the QUERY, I imagine it should work.

---

<div class="post-metadata">

**Author:** ![spencerb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spencerb/32/4486_2.png) [@spencerb](https://community.glideapps.com/u/spencerb)\
**Post date:** [July 29, 2020, 10:56pm UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/16 "2020-07-29T22:56:21Z")

</div>

Boom! That worked! Thanks so much!

---

<div class="post-metadata">

**Author:** ![Rosewebstudio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rosewebstudio/32/12261_2.png) [@Rosewebstudio](https://community.glideapps.com/u/Rosewebstudio)\
**Post date:** [July 30, 2020, 7:52am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/17 "2020-07-30T07:52:52Z")

</div>

Great work

Just wondering if you would be able to have one line for each user and then increment the login count by 1 every time the user logs in therefore the new sheet would be

**Email**

- [Scoobydoo@MysteryMachine.com](mailto:Scoobydoo@MysteryMachine.com)

**Login Count**

- 12

**Email**

- [Shaggy@MysteryMachine.com](mailto:Shaggy@MysteryMachine.com)

**Login Count**

- 27

And maybe last date logged in

Cheers 🍻

---

<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:** [July 30, 2020, 8:35am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/18 "2020-07-30T08:35:42Z")

</div>

I think there can be 2 approaches for this.

- Duplicate the App: Logins tab, make a relation matching the email column to itself, return multiple matches, then use rollup columns to get the count (login count) and latest (last date logged in).

- Use an incremental arrayformula for the login count and an arrayformula combined with sort for the last date logged in.

I imagine the first one would be way easier but if you guys need the second one let me know.

---

<div class="post-metadata">

**Author:** ![Rosewebstudio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rosewebstudio/32/12261_2.png) [@Rosewebstudio](https://community.glideapps.com/u/Rosewebstudio)\
**Post date:** [July 30, 2020, 8:46am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/19 "2020-07-30T08:46:07Z")

</div>

Even if we had email and total count (not date) that would be great

---

<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:** [July 30, 2020, 9:47am UTC](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695/20 "2020-07-30T09:47:05Z")

</div>

Quick show of what can be done with a QUERY.

> **[ThinhDinh's Glide Lab](https://docs.google.com/spreadsheets/d/1sEQHpSKyHx9w2F_Xx3lm56SU1p-8eI81OYU5TYvQFvw/edit#gid=2092321604)**
>
> Repeated sequence
> 
> User,Step,Order,Steps
> Ian Janicki,Consult,1,Consult
> Ian Janicki,Measure,2,Measure
> Ian Janicki,Materials Shipped,3,Materials Shipped
> Ian Janicki,Materials Arrived,4,Materials Arrived
> Ian Janicki,Renovation Complete,5,Renovation...

[Next page](https://community.glideapps.com/t/using-importrange-to-export-emails-in-app-logins-to-another-google-sheet/12695.md?page=2)
