Kaljkuljator generator

Day 1,196, 17:21 Published in Croatia Croatia by nosorog1

Generator tablice (VBA) s formulama za kalkulator profita u excelu. Formule iz članka Mony CRO.

Da se ne patite s upisivanjem formula…Generira tablicu identičnu onoj na slikama sa ubačenim formulama. jbga sve treba napravit na teži način 🙂
Članak: http://www.erepublik.com/en/article/-tutorijal-profit-u-tvrtkama-1694968/1/20

1. Otvorite novi excel dokument.
2. Tools -> Macro -> Visual Basic Editor
3. Insert -> Module
4. Copy Paste skriptu (dolje) u taj novi modul…. Stisnite F5…. tablica je generirana

5. U Excelu na Sheet1 napravite Replace all ( Find : IF, Replace: =IF )

Iz nepoznatog razloga excel ne trpi da se ubace formule koje sadrže zarez ili točka-zarez. Zato je korak 5 ključan da stupac G pretvori u excelovske formule

Ako radi radi, ako ne onda ne radi… ma je.. ovo bolje igrat čovječe ne ljuti se

Kopiraj ovo ispod crte
___________________________________________

Public Sub Generiranje_tablice()
With Sheet1
'............................ispis naziva
.Cells(12, 1) = "Kompanija"
.Cells(13, 1) = "Regije"
.Cells(14, 1) = "CS"
.Cells(15, 1) = "Q"
'..............................
.Cells(16, 2) = "Placa"
.Cells(16, 3) = "Skill"
.Cells(16, 4) = "Health"
.Cells(16, 5) = "Friend"
.Cells(16, 6) = "Booster"
.Cells(16, 7) = "PROD"
.Cells(16, 8 ) = "Proizvoda"
.Cells(16, 9) = "(prod)"
'...............................FORMULE
For i = 17 To 26
.Cells(i, 1) = "Radnik " & i - 16
.Cells(i, 9) = "=2*(3.6+(C" & i & "*0.4))*(1+2*D" & i & "/100)*(1+((F" & i & "+B13+B14+E" & i & ")/100))*8"
.Cells(i, 8 ) = "=G" & i & "/B12/B15"
.Cells(i, 7) = "IF(B" & i & "=0;0;I" & i & ")"
Next
'...............................formule - sumiranje
.Cells(27, 7) = "=SUM(G17:G26)+B9"
.Cells(27, 8 ) = "=SUM(H17:H26)+B10"
.Cells(27, 2) = "=SUM(B17:B26)"
.Cells(31, 20) = "😞B28*H27)-(B29*G27+B27)"
End With
End Sub