# Creating a control group using contact ID and format data action

**URL:** <https://community.hubspot.com/t/creating-a-control-group-using-contact-id-and-format-data-action/48263>\
**Category:** Data Hub\
**Tags:** format-data-actions\
**Created:** [December 9, 2021, 11:28am UTC](https://community.hubspot.com/t/creating-a-control-group-using-contact-id-and-format-data-action/48263 "2021-12-09T11:28:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stevie-Kv](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevie-kv/32/97206_2.png) [@Stevie-Kv](https://community.hubspot.com/u/Stevie-Kv)\
**Post date:** [December 9, 2021, 11:28am UTC](https://community.hubspot.com/t/creating-a-control-group-using-contact-id-and-format-data-action/48263/1 "2021-12-09T11:28:12Z")

</div>

Morning team!  
I have an interesting one I’d like to ask you guys about today, control groups. Several teams I work with use them to help track the success of campaigns, etc. Usually taking 10% who do not take part in the campaign.  
Currently, the team export new contacts, divide them up into groups 0-9 (Taking the 3rd to the last digit in their contact ID), then reimporting them with their new segments. A bit of a time-waster! This should be automatable.  
I feel like this should be possible through format data action in a workflow, but haven’t got there yet.  
Can you guys think of a way of clipping the first/last characters from the ID to retrieve 1 digit? Maybe even dividing/rounding/etc the contact ID down into 1 digit? The end goal being an even spread of contacts across 10 control groups 0-9.

(No cheating and saying custom code action 😉, I want the team to be able to do this without dev interaction if possible)

Steve

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [December 9, 2021, 12:04pm UTC](https://community.hubspot.com/t/creating-a-control-group-using-contact-id-and-format-data-action/48263/2 "2021-12-09T12:04:18Z")

</div>

Hi @Stevie-Kv,

Without custom code, that would only leave an integration like [Zapier](https://knowledge.hubspot.com/integrations/how-to-use-zapier-and-hubspot), for example. Send contacts into a Google Sheet, assign a [random number via a Google Sheet function](https://support.google.com/docs/answer/3093507?hl=en), sync that number back into the contact record. This would require a one time setup but not coding from end users. You could then easily build lists of the lower and the upper half of the numbers range.

Hope this helps!
