Hello I am working on a responsive gallery for showing images that I am struggling with on how to setup a dynamics wrap count so the number of images in a row dynamically changes based upon a resolution range. I say range as one can imagine when your resizing your browser you will cover ranges and not just hard limit resolutions that mobile uses. I feel like I have a good handle on the rest of the app and its responsive elements however this one I am really struggling with.
For example in the formula below a 4k computer will qualify for both the first 2 If statements so it will actually result in 55 rather than 5. The rest of the if statements are hard coded to a specific resolution and they do work however more or less not very desirable as they are not using ranges. I was hoping to use around 4 ranges that would cover low, medium, high, and 4k ranges rather than hardcoding a pile of specifics which does not work well when resizing. Any feedback on this is appreciated, I think I am just looking for some direction on using multiple ranges in a formula.
Examples of ranges
>= 3000 Wrap count 5
2000 - 2999 Wrap count 4
1000 - 1999 Wrap count 3
640 - 999 Wrap count 1
This is one I am testing and not working very well.
If(
Screen1.Width >= 3000,
5
) & If(
Screen1.Width = 3839,
5
) & If(
Screen1.Width = 2650,
4
) & If(
Screen1.Width = 2048,
4
) & If(
Screen1.Width = 2650,
4
) & If(
Screen1.Width = 1920,
3
) & If(
Screen1.Width = 720,
3
) & If(
Screen1.Width = 640,
1
) & If(
Screen1.Width = 999,
2
)