Randomising block of rows in excel in a loop

So, this is what is happening.
The three blocks in each loop1 etc are occurring in the following pattern:
block1 (row 1,2,3) - twice
block2 (row 4,5,6) - once
block3 (row 7,8,9) - once
block1 (row 1,2,3) - once
block2 (row 4,5,6) - once
following which, loop 1 moves on to loop 2.

What I want is the blocks to be randomised without the blocks or the trials being repeated. So, three blocks in one loop before moving on to the next loop.

The code you have should be working. However, it would make more sense for nReps of the outer loops to be head1 etc.

You could try adding a code component to print the values of your variables.

For example

print(‘useRows’,useRows)

You could also set all loops to sequential for testing purposes to identify exactly where the issues are.

File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\data\utils.py”, line 461, in importConditions
raise TypeError("importConditions() was given some "
TypeError: importConditions() was given some indices but could not parse them

This is the error I get in the runner. The problem remains the same.

This also results in some trials being repeated while others are not. I dont understand where the repetition is coming from.

I’m confused. Is it running with repetitions or not running with an error?

Try the attached spreadsheet for outer
outer.xlsx (8.0 KB)

Oh this worked perfectly! The problem seemed to be with the outer file.

Thank you SO much for all your help! :smiley:

May I ask how you managed to insert the values without them turning into a time format?

I told Excel to reformat the column as text.

Thank you!