hi @RobChilds , @KvB1 is spot on but if you up to another approach please review the following.
Add two columns to your collection: ne to determine the color ("_colour") and one to add the floor ("Floor") - you may wish to join another collection if the floors are already available. this is just to share a concept.
I am creating 50 entries and slicing it into 5 rows. i then add two columns and add some logic to it.
ClearCollect(
colSomeData,
AddColumns(
ForAll(Sequence(50,1),{item: Value}), //your datasource goes here
"_Colour", //lets get an indicator for colour 1 = white, 0 = limegreen
If(item in colGrid,0,1),
"Floor", //title of the column to keep your floors
Switch( //logic for your floors (i filtered the value by 10 to get 5 floors)
true,
ThisRecord.item < 11,"Floor 1",
And(ThisRecord.item >= 11,ThisRecord.item < 21),"Floor 2",
And(ThisRecord.item >= 21,ThisRecord.item < 31),"Floor 3",
And(ThisRecord.item >= 31,ThisRecord.item < 41),"Floor 4",
"Floor 5"
)
)
)
Now that the collection is sorted, add a gallery and set the item to "yourCollection"I have wrapped the gallery to get the grid effect you have (just 10 instead on 19)
I added another collection where i added a few numbers which represents the email collection
ClearCollect(colGrid,1,2,3,4,19,27,43,49)
in the above collection you can see if the number is found in this collection it sets the color indicator to either 0 or 1.
In the gallery add a label which will hold the text which you wish to evaluate in your case email in my case a number which appears in colGrid. Set the fill property of the label to
If(ThisItem._Colour = 0,LimeGreen, RGBA(0, 0, 0, 0))
the result is (all the numbers in colGrid have a green background)

Now add a dropdown and set its item to your collection, distinctly to floor
Distinct(colSomeData,Floor)
the dropdown area cannot change background so i am adding another gallery to display the floor.
add the item you wish to the gallery in a label.
set the Templatefill of the gallery to
If(ThisItem._Colour = 0, LimeGreen, RGBA(0, 0, 0, 0))
set the gallery Item to
SortByColumns(Filter(colSomeData, Floor = Dropdown1.SelectedText.Result),"_Colour","Value")
the dropdown being yours of course. i am sorting the colours to follow each other then the number.
this is what you get
Floor 5

floor 1

Floor 4

hope this give some ideas.