# Counterbalancing tasks

**URL:** <https://discourse.psychopy.org/t/counterbalancing-tasks/18918>\
**Category:** Builder\
**Created:** [December 11, 2020, 8:09pm UTC](https://discourse.psychopy.org/t/counterbalancing-tasks/18918 "2020-12-11T20:09:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Kilgallon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/daniel_kilgallon/32/12604_2.png) [@Daniel\_Kilgallon](https://discourse.psychopy.org/u/Daniel_Kilgallon)\
**Post date:** [December 11, 2020, 8:09pm UTC](https://discourse.psychopy.org/t/counterbalancing-tasks/18918/1 "2020-12-11T20:09:10Z")

</div>

Win10  
PsychoPy version 2020.2.10

What are you trying to achieve?:  
I was wondering if there is a way to counterbalance loops. Essentially I want participants to either do the routines in loop A then the routines in loop B or the opposite with B first and A second. Is there a simple way to do this in the builder.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [December 12, 2020, 4:27am UTC](https://discourse.psychopy.org/t/counterbalancing-tasks/18918/2 "2020-12-12T04:27:26Z")

</div>

Add an outer loop which points to an Excel file with two columns (e.g. showA and showB) with two rows (0 1 and 1 0)

Then put showA as the nReps for loop A and showB as the nReps for loop B

---

<div class="post-metadata">

**Author:** ![Daniel\_Kilgallon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/daniel_kilgallon/32/12604_2.png) [@Daniel\_Kilgallon](https://discourse.psychopy.org/u/Daniel_Kilgallon)\
**Post date:** [December 12, 2020, 12:22pm UTC](https://discourse.psychopy.org/t/counterbalancing-tasks/18918/3 "2020-12-12T12:22:07Z")

</div>

Thank you very much.

---

<div class="post-metadata">

**Author:** ![Musholo](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@Musholo](https://discourse.psychopy.org/u/Musholo)\
**Post date:** [November 17, 2021, 5:36pm UTC](https://discourse.psychopy.org/t/counterbalancing-tasks/18918/4 "2021-11-17T17:36:10Z")

</div>

THIS WAS SUPER EASY! By far the best post about balancing two loops, and guessing it could easily be adapted to more than 2. THANK YOU!
