Forum Discussion

BenjaminH2180's avatar
BenjaminH2180
Copper Contributor
Mar 12, 2024
Solved

Too many parameters with OR function

Hi I am trying to write a quick formula to adjust rate of pay dependent of the date of service. Here's the formula I've got:   =IF(AND(Table1[@User]="Person's name")*(OR(Table1[@Date]>=DATEVALUE("...
  • HansVogelaar's avatar
    Mar 12, 2024

    BenjaminH2180 

    Apart from the errors in the formula, it would get unwieldy very quickly if you want to expand it for more date ranges or more users.

    I'd create a lookup range like this:

    C2, D2 etc. contain the starting date of each date range; B3, B4 etc. the unique user names.

    The range can easily be expanded to accommodate more dates and users.

    The formula for the rate in your table can then be

     

    =INDEX($C$3:$F$5, MATCH([@User], $B$3:$B$5, 0), MATCH([@Date], $C$2:$F$2))

     

Resources