Tæl.Hvis angiver antallet af forekomster. Det jeg har brug for, er at der i cellen står hvilke opgaver, der har givet 0-point og hvilke der har givet 0,5-point osv.
Ex. 0-point: spørgsmål 1 og 3 og 4 - Så skal der stå 1,3,4
der kan godt anvendes komma som seperator mellem tallene, men så opfattes enkelt værdier som tal, og flere værdier som tekst
Sub point() Range("H8:H10") = "" For x = 1 To 100 If Cells(x, 3) <> "" And Cells(x, 4) = 0 Then Cells(8, 8) = Cells(8, 8) & x & "-" If Cells(x, 3) <> "" And Cells(x, 4) = 0.5 Then Cells(9, 8) = Cells(9, 8) & x & "-" If Cells(x, 3) <> "" And Cells(x, 4) = 0 Then Cells(10, 8) = Cells(10, 8) & x & "-" Next End Sub
Sub point() Range("H8:H10") = "" For x = 1 To 100 If Cells(x, 3) <> "" And Cells(x, 4) = 0 Then Cells(8, 8) = Cells(8, 8) & x & "-" If Cells(x, 3) <> "" And Cells(x, 4) = 0.5 Then Cells(9, 8) = Cells(9, 8) & x & "-" If Cells(x, 3) <> "" And Cells(x, 4) = 1 Then Cells(10, 8) = Cells(10, 8) & x & "-" Next End Sub
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.