I am trying to compare a date with a date range, if my date in Sheet3!A2 is equal to or greater than Sheet3!F3 and less than or equal to Sheet3!g3 give me a value of x.
A simple, but not elegant way of doing this is use the following formula in the cell in which you want your 'x' to appear. This does a little more than you've asked for, but you can modify if you don't care about the other values.
=if(a2>=f3,if(a2<g3,h3,j3),i3)
In addition to the problem you've provided, I've assumed that column H (same row) contains the value you want if the a2 is within the range, column I contains a value for before the date range and column j contains the value for after the range. I included the latter two because the fields are included in the formula. If you don't want them, you can replace j3 and i3 in the formula with 0 or any other value you want when out of range. If you leave them out of the formula, it will return the logical value FALSE when out of range - you may not want that.
Well the symbol for greater than would be => and for lesser than would be +< so if you can incorporate that into your formula it should work. Something like A2=>Sheet3.
122 views
Usually answered in minutes!
×