Hi SJB,

 

ich habe mal die erste Funktion Deines Scripts etwas umgearbeitet. Damit sollte der numerische Teil klappen.  Ist das elegant, eher nicht. Kann das besser wahrscheinlich ja. Ich bin kein Sheets Experte und auch kein Software Developer.

 

function scoreToGrade1(grade) {

 if (grade < 60)  {

        grade = "F";

        return grade;

   } 

  else if (grade >= 60 && grade <= 69) {

        grade = "D";

        return grade;

    }   

 else if (grade >= 70 && grade <= 79) {

        grade = "C";

        return grade;

 }

 

  else if (grade >= 80 && grade <= 89) {

        grade = "B";

        return grade;

  }

  else if (grade >= 90) {

        grade = "A";

        return grade;  

    }

   }

 

 

 

VG

Axel

 

Gesendet von Mail für Windows

 

Von: Olaf Stolle
Gesendet: Dienstag, 27. September 2022 20:09
An: google-spreadsheets-api@googlegroups.com
Betreff: Re: Apps Script Code Help!

 

das sind Funktionen und Du kannst es einfach Heraus kopieren und Experimentieren.

 

oder gib mir deine tabelle zu edit frei.

 

VG

 

Olaf

 

Am Di., 27. Sept. 2022 um 20:05 Uhr schrieb SJ B <sbahn...@gmail.com>:

Danke Olaf. Muss ich dies in das Apps-Skript oder direkt in die Tabelle eingeben?

On Tuesday, September 27, 2022 at 11:30:45 AM UTC-4 olaf....@gmail.com wrote:

Hallo,

versuche es mal mit diesen Ansätzen

G

H

J

90-100=A, 80=89=B, 70-79=C, 60-69=D, <60=F.

 

61

D

=WENN(UND(J4>=G5; J4<=H5);I5; WENN(UND(J4>=G6; J4<=H6);I6; WENN(UND(J4>=G7; J4<=H7);I7; WENN(UND(J4>=G8; J4<=H8);I8; WENN(UND(J4>=G9; J4<=H9);I9)))))

90

100

Ein

80

89

B

70

79

C

60

69

D

0

60

F

A+

Ein

=ERSETZEN(J11; FINDEN("+"; J11);1;"")

 

 

Am Di., 27. Sept. 2022 um 16:54 Uhr schrieb SJ B <sbah...@gmail.com>:

PS: I'm a newbie and am trying to do this on my own so please keep it simple with the responses as I'm not as versed as some of you are with this! Thank you! :D

On Tuesday, September 27, 2022 at 10:52:52 AM UTC-4 SJ B wrote:

I’m working with data in Google Sheets. I have a list of information containing grades that are numerical on a scale of 0-100, as well as letter grades (A+, A, A-, etc.) 

I need to get all this information in one clear format in my Google Sheets Sample.

  • All numerical scores from 90-100=A, 80=89=B, 70-79=C, 60-69=D, <60=F. 
  • I also need to get rid of the A+ or A-, etc. designations and just have solid A, B, C, D, F letter grades. 
  • This will eliminate the numerical scores and the A+,A-, etc. designations because they will be condensed into chunked, straight letter grade categories.

Can someone help me fix this? I'm not sure what I'm doing wrong! I need every cell in the spreadsheet to convert, and creating filters and sorting to do manually is NOT an option with the amount of data I have to do this with!

 

Thanks in advance!

 

Here's the Apps Script Code I created for the sample data I'm working with:

 

function scoreToGrade(range) {

    if (range >= 90) {

        return "A";

    } else if (range <= 89) {

        return "B";

    } else if (range >= 80) {

        return "B";

    } else if (range <= 79) {

        return "C";

    } else if (range >= 70) {

        return "C";

    } else if (range <= 69) {

        return "D";

    } else if (range >= 60) {

        return "D";

    } else if (range > 59) {

        return "F";

    }

}

 

function lettertoConvert(letter) {

    if (letter = "A+") {

        return "A";

    } else if (letter = "A-" ) {

        return "A";

    } else if (letter = "B+") {

        return "B";

    } else if (letter = "B-") {

        return "B";

    } else if (letter = "C+") {

        return "C";

    } else if (letter = "C-") {

        return "C";

    } else if (letter = "D+") {

        return "D";

    } else if (letter = "D-") {

        return "D";

    }

}

--
You received this message because you are subscribed to the Google Groups "Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-spreadshee...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-spreadsheets-api/b48c513e-5fb3-4b39-9d0f-556307715366n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-spreadsheets-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-spreadsheets-api/c78cfe2c-f889-4268-8427-e7dde4319954n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-spreadsheets-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-spreadsheets-api/CAOgA698OVYfC95YHhrcTb5ZDp8%2BRRt%2BrXRPJU4qiX0%2BooHZf3w%40mail.gmail.com.

 

--
You received this message because you are subscribed to the Google Groups "Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-spreadsheets-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-spreadsheets-api/821386D1-4AC9-4117-915C-F064AE48E37E%40hxcore.ol.

Reply via email to