Need a hand writing a formula

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I'm making up a spreadsheet where it tells me how many on call shifts I've done. The issue I currently have is that there are a group of 7 dates in a column which count as double shifts. What i'd like to do it compare the dates in these cells to the dates in another column and if one of them matches, then I'd like to make the value of a different cell "2"

I figure a huge if statement would do it but there must be a simpler way..

Any help would be appreciated
 
I'm having a blank moment-

=IF(ISNA(MATCH(A1,$D$1:$D$3,0)),0,2)

is my suggestion though I'm sure there's a better way....

A1 is the date to compare, D1:D3 is the range of dates and if i
doesn't match you get the error "#N/A". This is then picked up and use
in the IF statement.

You can then drag the match function so it checks all of your date
against the range.

Dunca
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top