Please try:
=vLOOKUP(R3,Calculations!$B$2:$C$7,2,0)
For LOOKUP (as opposed to VLOOKUP) to work properly the data must be sorted.
The anchors () are in case say the formula was to be copied down (eg to return a value from R4). Without them the array range would slide down automatically until by R9 the search would be of Calculations!B8:C13.$
Yes, it is possible to emulate many of the built-in functions by using Class Spreadsheet (SpreadsheetApp) and JavaScript Array Object and its methods, but "the emulations" usually will be slower than built-in functions.
Knowing the above I consider that the core of the question is how to use JavaScript to emulate VLOOKUP and other built-in functions.
I order to keep this answer short, here is an example taken from the answer to Writing google Javascript similar to vlookup
function findinB() { var sh = SpreadsheetApp.getActiveSheet(); var ss = SpreadsheetApp.getActiveSpreadsheet(); var last=ss.getLastRow(); var data=sh.getRange(1,1,last,2).getValues();// create an array of data from columns A and B var valB=Browser.inputBox('Enter value to search in B') for(nn=0;nn<data.length;++nn){ if (data[nn][1]==valB){break} ;// if a match in column B is found, break the loop } Browser.msgBox(data[nn][0]);// show column A }
Just replace the Browser.inputBox by the data sources that you want to use.
Note: There are several questions on Stack Overflow about how to implement VLOOKUP on JavaScript and/or Apps Script, like Does JavaScript or jQuery have a function similar to Excel's VLOOKUP?
Try using (Documentation) instead of SUMIF or LOOKUP.VLOOKUP
Like so:
=SUMIF(D5:D16;"tax";E5:E16)
Also, as you are using a Polish "Locale", you should use instead of ;.,
Reasoning: whether you have to use or , depends on the "Locale" of the spreadsheet, under File –> Spreadsheet Settings. For example, a US or UK "Locale" would use the former (;) while a Hungarian or Polish "Locale" would use the latter (,);