I'm bedevilled by Excel (Intermediate Question)

I havetried every bit of junk syntax I can think of I have googled and googled and I am all googled out, so I once again I turn to the smartest people I know.

I want to write a little logical fuinction which says:

If I2 is greater than or equal to B2 and I2 is less than or equal to D2, then display I2, or display “”

and I can’t seem to get the two functions to coexist in the same cell. Any ideas?

=IF(D7>=D6,IF(C6<C7,I2,""),"") should work?

ETA: it worked insofar as I tested it, anyways, it’ll display nothing if the outside value is false, if it’s true, it tests the new IF, if that’s false, displays nothing, if true, displays I2. It worked for a couple values I tested. Just keep nesting for more conditions, it’s not really efficient, but it works.

ETA2: sry just realized, those cell values I pulled from some spreadsheet I already had, obviously replace them with the ones you want

=if(and(i2>=b2,i2<=d2),i2,"")