Hello, I've written some code that converts 1500 data points to about 200 (copies every 20th data point to the right), since Exel can't use more than 250 to draw a graph. So the wird part is, if I use the code below, everything works fine, but if I devide the result by 10, I get "0" in the fields.
[/URL][/IMG]
Now, if i devide the result by 10 (code below) I get zeros at the end
[/URL][/IMG]
Does anyone know why this happens?
Sub Gumb_graf()
navpicno = 2
navpicnoBrezPreskoka = 2
obmocjePolnihCelic = 2
'prešteje polne celice leve tabele
Do While Worksheets("List1").Cells(navpicnoBrezPreskoka, 1) <> ""
obmocjePolnihCelic = obmocjePolnihCelic + 1
navpicnoBrezPreskoka = navpicnoBrezPreskoka + 1
Loop
'določanje celic, katere se bodo zajele
vsakiKolikiPodatek = Round(obmocjePolnihCelic / Worksheets("1").Cells(16, 16), 0)
navpicnoBrezPreskoka = 2
'praznjenje desne tabele, da se ne prekriva
Do While Worksheets("List1").Cells(navpicnoBrezPreskoka, 16) <> ""
Worksheets("List1").Cells(navpicnoBrezPreskoka, 16) = ""
Worksheets("List1").Cells(navpicnoBrezPreskoka, 17) = ""
Worksheets("List1").Cells(navpicnoBrezPreskoka, 18) = ""
Worksheets("List1").Cells(navpicnoBrezPreskoka, 19) = ""
navpicnoBrezPreskoka = navpicnoBrezPreskoka + 1
Loop
navpicnoBrezPreskoka = 2
navpicno = 2
Do While Worksheets("List1").Cells(navpicnoBrezPreskoka, 1) <> ""
Worksheets("List1").Cells(navpicnoBrezPreskoka, 16) = Worksheets("List1").Cells(navpicno, 5)
Worksheets("List1").Cells(navpicnoBrezPreskoka, 17) = Worksheets("List1").Cells(navpicno, 2)
Worksheets("List1").Cells(navpicnoBrezPreskoka, 18) = Worksheets("List1").Cells(navpicno, 3)
Worksheets("List1").Cells(navpicnoBrezPreskoka, 19) = Worksheets("List1").Cells(navpicno, 4)
navpicno = navpicno + vsakiKolikiPodatek
navpicnoBrezPreskoka = navpicnoBrezPreskoka + 1
Loop
End Sub
Now, if i devide the result by 10 (code below) I get zeros at the end
Sub Gumb_graf()
navpicno = 2
navpicnoBrezPreskoka = 2
obmocjePolnihCelic = 2
'prešteje polne celice leve tabele
Do While Worksheets("List1").Cells(navpicnoBrezPreskoka, 1) <> ""
obmocjePolnihCelic = obmocjePolnihCelic + 1
navpicnoBrezPreskoka = navpicnoBrezPreskoka + 1
Loop
'določanje celic, katere se bodo zajele
vsakiKolikiPodatek = Round(obmocjePolnihCelic / Worksheets("1").Cells(16, 16), 0)
navpicnoBrezPreskoka = 2
'praznjenje desne tabele, da se ne prekriva
Do While Worksheets("List1").Cells(navpicnoBrezPreskoka, 16) <> ""
Worksheets("List1").Cells(navpicnoBrezPreskoka, 16) = ""
Worksheets("List1").Cells(navpicnoBrezPreskoka, 17) = ""
Worksheets("List1").Cells(navpicnoBrezPreskoka, 18) = ""
Worksheets("List1").Cells(navpicnoBrezPreskoka, 19) = ""
navpicnoBrezPreskoka = navpicnoBrezPreskoka + 1
Loop
navpicnoBrezPreskoka = 2
navpicno = 2
Do While Worksheets("List1").Cells(navpicnoBrezPreskoka, 1) <> ""
Worksheets("List1").Cells(navpicnoBrezPreskoka, 16) = Worksheets("List1").Cells(navpicno, 5)
Worksheets("List1").Cells(navpicnoBrezPreskoka, 17) = Worksheets("List1").Cells(navpicno, 2) / 10
Worksheets("List1").Cells(navpicnoBrezPreskoka, 18) = Worksheets("List1").Cells(navpicno, 3) / 10
Worksheets("List1").Cells(navpicnoBrezPreskoka, 19) = Worksheets("List1").Cells(navpicno, 4) / 10
navpicno = navpicno + vsakiKolikiPodatek
navpicnoBrezPreskoka = navpicnoBrezPreskoka + 1
Loop
End Sub
Does anyone know why this happens?