Converting a Google Apps Script to VB Script (Excel) : I guess this will seem a bit lazy, but I have been working on this for quite a few hours to get it to work in Google Sheets. Now I have the need to also get it to work in Excel, using VB script. It's a pretty simple script for experienced programmers, which I am not. :-)

I have a range of letters in a spreadsheet. Each letter represent a value. The Google Apps Script looks like this:

    function Arsarbetstid(v,year) {
      switch(year) {
          
        case 2020:    // Tider gällande 2020
          var n=6.7,  // N
              np=9,   // N+
              k=8.8,  // K
              km=7,   // K-
              k4=4,   // K4
              d=8.8,  // D
              h=12,   // H
              hp=13;  // H+
          break;
          
        case 2019:    // Tider gällande 2019
          var n=6.9,  // N
              np=9,   // N+
              k=8.7,  // K
              km=7,   // K-
              k4=4,   // K4
              d=9,    // D
              h=12,   // H
              hp=13;  // H+
          break;
          
        case 2018:    // Tider gällande 2018
          var n=6.9,  // N
              np=9,   // N+
              k=8.7,  // K
              km=7,   // K-
              k4=4,   // K4
              d=9,    // D
              h=12,   // H
              hp=13;  // H+
          break;
          
        case 2017:    // Tider gällande 2017
          var n=7,    // N
              np=9,   // N+
              k=8.8,  // K
              km=7,   // K-
              k4=4,   // K4
              d=9.1,  // D
              h=12,   // H
              hp=13;  // H+
          break;
          
        case 2016:    // Tider gällande 2016
          var n=7,    // N
              np=9,   // N+
              k=8.8,  // K
              km=7,   // K-
              k4=4,   // K4
              d=9.1,  // D
              h=12,   // H
              hp=13;  // H+
          break;
          
        case 2015:    // Tider gällande 2015
          var n=7,    // N
              np=9,   // N+
              k=8.8,  // K
              km=7,   // K-
              k4=4,   // K4
              d=9.1,  // D
              h=12,   // H
              hp=13;  // H+
          break;
          
        case 2014:    // Tider gällande 2014
          var n=7,    // N
              np=9,   // N+
              k=8.8,  // K
              km=7,   // K-
              k4=4,   // K4
              d=9.1,  // D
              h=12,   // H
              hp=13;  // H+
          break;
          
        case 2013:    // Tider gällande 2013
          var n=7,    // N
              np=9,   // N+
              k=8.8,  // K
              km=7,   // K-
              k4=4,   // K4
              d=9.1,  // D
              h=12,   // H
              hp=13;  // H+
          break;
          
        default:      // Tider gällande om inget årtal anges.
          var n=6.7,  // N
              np=9,   // N+
              k=8.8,  // K
              km=7,   // K-
              k4=4,   // K4
              d=8.8,  // D
              h=12,   // H
              hp=13;  // H+
          break;   
          
      }
    
      var total = 0;
      for (var i=0;i < v.length;i++) {
        var row = v[i];
        for (var j=0;j < row.length;j++) {
           switch(row[j]) {
             case "N":
               total += n;
               break;
             case "N+":
               total += np;
               break;
             case "D":
               total += d;
               break;
             case "H":
               total += h;
               break;
             case "H+":
               total += hp;
               break;
             case "K":
               total += k;
               break;
             case "K-":
               total += km;
               break;
             case "K4":
               total += k4;
               break;
                      }
        }
      }
        
      return total;
    };

v is the range of letters and year is just an integer representing a year so I can chose different values of the letters depending of the year.
I have tried, and so far failed, to convert this to VBscript. Is there anyone out there skilled enough to help me convert this? It shouldn't be too hard to anyone with at least a little above basic skills in both Javascript and VBscript.

I would be very grateful for the help.

Kind regards,
Michael