and/or formulas

0

i

In our payroll we have pay numbers that falls into biweekly pays.

ex: pay 1 Dec 25 Jan 7/17

      Pay 2 Jan 8 Jan 21/17

I want a formulas that says:

if someone worked between Dec 25 and Jan 7/17 give me 2 (for pay)

if someone worked between Jan 8 and Jan 21/17 give me 3 and so on and on

Update

something like this - but without the * before the secon if

=IF(OR(F11>=C11,F11<=E11),B12,"")*IF(OR(F11>=C12,F11<=E12),B13,"")

Answer
Discuss

Discussion

Next time add your updates to the original question. When you add an answer, like you did, it looks like the question was already answered.
don (rep: 1317) Jan 6, '17 at 3:19 am
Add to Discussion

Answers

0

To nest IF statements you need to follow this format:

=IF(A1>A2,"yes",IF(A3>A2,"ok","no"))

So each IF statement goes into the "value_if_false" argument of the previous IF statement.

To fix your IF statement, it would look like this:

=IF(OR(F11>=C11,F11<=E11),B12,IF(OR(F11>=C12,F11<=E12),B13,""))

Here is our tutorial on nesting IF statements and on Vlookups for ranges and Vlookup on dates and times

The last two links might work well with your situation if you have a large list of dates/times.

Discuss

Answer the Question

You must create an account to use the forum. Create an Account or Login