Forum Discussion

KimKE7359's avatar
KimKE7359
Copper Contributor
Dec 21, 2022

Help with IF function

I am trying to create a spreadsheet to track allowed vacation time for employees. I would like column F to contain a formula that will return the correct number of vacation days for an individual employee based on position and years of service. My parameters are in I:K. 

 

 

  • KimKE7359 

    You can try this formula. Enter the formula with ctrl+shift+enter if you don't work with Office365 or Excel 2021.

    =INDEX($K$2:$K$38,MATCH(1,(C2=$I$2:$I$38)*(D2=$J$2:$J$38),0))

     

    • KimKE7359's avatar
      KimKE7359
      Copper Contributor

      This does not work. It returns "#N/A". Also, ctrl+shift+enter does nothing. 

      • OliverScheurich's avatar
        OliverScheurich
        Gold Contributor

        KimKE7359 

        Does ctrl+shift+enter add the curly brackets (highlighted in the screenshot) to the formula? You can click in the formula bar with the mouse and then confirm the formula with ctrl+shift+enter. This adds the " { " and " } " and then the arrayformula returns the result.

Resources