# Account collection with only starred accounts but which exclude a type of account

**URL:** <https://community.silverfin.com/t/account-collection-with-only-starred-accounts-but-which-exclude-a-type-of-account/1583>\
**Category:** Templates\
**Created:** [October 14, 2019, 9:58am UTC](https://community.silverfin.com/t/account-collection-with-only-starred-accounts-but-which-exclude-a-type-of-account/1583 "2019-10-14T09:58:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandra](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@Alexandra](https://community.silverfin.com/u/Alexandra)\
**Post date:** [October 14, 2019, 9:58am UTC](https://community.silverfin.com/t/account-collection-with-only-starred-accounts-but-which-exclude-a-type-of-account/1583/1 "2019-10-14T09:58:13Z")

</div>

Is it possible to create an account collection with only starred accounts but which excludes a type of accounts (model of account) ?  
In my case, I would like to exclude the model of account “current accounts” from my reconciliation.

Here is my actual code

```auto
| **AUTRES DETTES** {% assign standard_range = "48" %}{% assign starred_range = period.accounts[standard_range].starred | map:"number" | join:"," %}{% if custom.accounts.numbers_48 == blank %}{% assign account_range48 = starred_range %}{% else %}{% assign account_range48 = custom.accounts.numbers_48 %}{% endif %}{% input custom.accounts.numbers_48 as:account_collection range:starred_range default:account_range48 accounts_var:accounts_48 %}|
{% assign current_account = accounts_48 %}
|--60%--|-20%--:|-5%-:|-20%-:+{% for account in current_account %}
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _*{{ account.name }}*_ {%assign acc_key = account.number%}| 

|--60%--|-20%--:|-5%-:|-20%-:+{% for detail in current_account.[acc_key].details %}
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {{ detail.custom.title }} | {{ detail.custom.value|currency }} {% endfor %}
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |_ _|
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | {{ account.value|currency }}
{% endfor %}

```

---

<div class="post-metadata">

**Author:** ![sven](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/sven/32/1495_2.png) [@sven](https://community.silverfin.com/u/sven)\
**Post date:** [October 14, 2019, 11:06am UTC](https://community.silverfin.com/t/account-collection-with-only-starred-accounts-but-which-exclude-a-type-of-account/1583/2 "2019-10-14T11:06:53Z")

</div>

Hello @Alexandra,

I think what you’re going for, is described here:

> [@CASE: create unique selectable account ranges](https://community.silverfin.com/t/case-create-unique-selectable-account-ranges/1261):
>
> Let’s say we create a forloop over an array, and each item of that array will be used to create a hashtag to select some accounts, like this: Of course, one account can not be linked to more than one categorie. So, how can we make sure that each hashtag show the accounts that have not yet been selected? First of all, this is the code for above example: {% comment %}create different categories to loop over{% endcomment %} {% assign array\_categories = "IMVA|MVA|FVA" | split:"|" %} {% ass…

So basically, if you wish to create a string with all type of accounts in it, besides assets eg, you’ll need to loop over all those different accounts, and create one string from it, which you can then use for the range.  
Excluding isn’t an option for now, but with a workaround you can however.  
Can you let me know if this works out for you?

PS haven’t found many cases in which you’d want t exclude a certain type of account… Most cases, the range is enough for this (definitely in Belgium with our fixed chart of accounts).
