# IF, AND and TODAY() problems!

Hey folks,

I’m trying to make a check in/ out system for a music venue/ studio so they can see which members of staff are on site at any given time. I’ve used two forms where staff can check in and out which populates a table. That side of things is working fine.

The following formula shows whether someone is currently checked in:

``````IF(AND({time in},{time out}),"❌",IF(AND({time in},NOT({time out})),"✅",BLANK()))
``````

I’d like the formula above to also show an for those who haven’t signed out on a previous day (So the s are only for people signed in on the current day). I’ve tried to do this by comparing the most recent check in to the days date using the TODAY() function but it appears to be including the previous day as well (which I really don’t understand).

Hopefully that makes sense. I’ve been staring at Airtable for far too long today and might be going mad! Any help will be greatly appreciated.

Many thanks,
Ross

Hi there! I think the following should do the trick!

`IF({Time In}, IF(OR(AND({Time In}, {Time Out}), AND({Time In}, IS_SAME(DATETIME_FORMAT({Time In}, 'M/D/YYYY'), DATEADD(TODAY(), -1, 'day')))), "❌", "✅"))`

1 Like

Hi and Welcome @rfrly,

This should do it

`IF(IS_BEFORE({Time In}, TODAY()),"❌",IF(AND({Time In},{Time Out}),"❌",IF(AND({Time In},NOT({Time Out})),"✅",BLANK())))`

2 Likes

Brilliant, thank you!

I have another table called “staff” that is linked to the “check in” table. By referring to that formula would it be possible fetch the current check in status of each staff member and show that on the “staff” table? For example:

Mark S |
Joe B |
Megan R |

Many thanks,
Ross

Hi @rfrly,

Thank you. I would link STAFF into the CHECK IN sheet and then concatenate them

`CONCATENATE(Staff," | ",{Here Today})`

HTH, Nathalie

Thanks @Nathalie_Collins. Does that mean it wouldn’t be possible to have the current check in status show on the staff table? I’ve had a play with look up and rollup but so far no luck. Ideally I’d just have a Staff table view with all the staff members names and then their current sign in status next to it!

thank you

@rfrly

Yes, you can go that way as well. I created this base as it demonstrates it much better than I could in text.

2 Likes

Great! Thank you @Nathalie_Collins so much

1 Like