Forum Discussion
Sjbrinkley
Jul 19, 2023Copper Contributor
IF Function to return 1 or 0 based on date criteria.
I think I need an IF function to return either a 1 or 0 for the visit dates based on the start dates in column A, but maybe there is a better way? The start dates represent a change that would ...
sookoon
Jul 19, 2023Copper Contributor
Hi Sjbrinkley
I think firstly the scenario is not well-defined. The end date is there but not used. Secondly the way that data is structured horizontally for the result data and vertically for the data is awkward.
With above out of the way, instead of using IF, we can use something like =--(A7<B2) . The "<" will give us the True False that you are looking for. We can convert it to 1 and 0 with the double negative.
Your result data is horizontal and lookup range is vertical. One way to solve this is use Transpose, something like =--(TRANSPOSE(A7:A10)<B2:E2)