Results 1 to 6 of 6

Thread: A VBA

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Nov:2009
    Location:
    Posts: 783

    A VBA

    : 7 (x;y;r;a;s;t;v), - , L- , -p. , ... . "" , : ( )... . x>0 , y>0 .... - , .
    Dim x As Variant, y As Variant, z As Variant, k As Variant, l As Variant, r As Variant, s As Variant, t As Variant, v As Variant
    x = 1.Value
    y = 2.Value
    r = 3.Value
    a = 4.Value
    s = 5.Value
    t = 6.Value
    v = 7.Value

    k = .Value

    g = Val(x) + Val(y) + Val(r) + Val(a) + Val(s) + Val(t) + Val(v)
    g1 = Val(y) + Val(r) + Val(a) + Val(s) + Val(t) + Val(v)
    g2 = Val(r) + Val(a) + Val(s) + Val(t) + Val(v)
    g3 = Val(a) + Val(s) + Val(t) + Val(v)
    g4 = Val(s) + Val(t) + Val(v)
    g5 = Val(t) + Val(v)
    g6 = Val(v)
    '
    l = Round(Val(k) * 1.2, 2)
    '
    p = Round(l / g, 5)

    'If x > "" And y > "" And z > "" And r > "" And s > "" And t > "" And v > "" Then
    fd = Round(p * x, 2)
    qd = Round(fd / x, 5)
    m1 = Round(l - fd, 2)
    qc = Round(m1 / g1, 5)
    fc = Round(qc * y, 2)
    m2 = Round(l - fd - fc, 2)
    qr = Round(m2 / g2, 5)
    fr = Round(qr * r, 2)
    m3 = Round(l - fd - fc - fr, 2)
    qa = Round(m3 / g3, 5)
    fa = Round(qa * a, 2)
    m4 = Round(l - fd - fc - fr - fa, 2)
    qs = Round(m4 / g4, 5)
    fs = Round(qs * s, 2)
    m5 = Round(l - fd - fc - fr - fa - fs, 2)
    qg = Round(m5 / g5, 5)
    fg = Round(qg * t, 2)
    m6 = Round(l - fd - fc - fr - fa - fs - fg, 2)
    qm = Round(m6 / g6, 5)
    fm = Round(qm * v, 2)

    End Sub
    /Hidden:

  2. #2
    Registered User
    Join Date: Jul:2009
    Location: Bulgaria
    Posts: 848
    . VBA virtual basketball association. , JAVA ?
    Code:
    import java.util.ArrayList;
    import java.util.Scanner;
    
    public class Testov1 {
    	public static void main(String[] args) {
    		Scanner reader = new Scanner(System.in);
    		ArrayList<Integer> producti = new ArrayList();                                                                           // Tuka se zapazvat stoinostite i nqma zna4enie kolko sa moje i 1000
    		System.out.println("Napi6ete p1rvo cenata mosiu i posle koli4estvata ne obratnoto!!!");
    																								
    		double cena = reader.nextDouble();
    		int ob6tokoli4estvo = 0;
    		while (reader.hasNextInt()) {                                                                                                     // A tuk v1tre se smqtat ob6toto koli4esto i se dobavqt produktite
    			int i = reader.nextInt();
    			ob6tokoli4estvo += i;
    			producti.add(i);
    		}
    		System.out.println("Cenata s DDS e: " + cena * 1.2 + " a edini4na cena e: " + cena / ob6tokoli4estvo);
    		System.out.println("Cenite za vseki produkt po otdelno sa kakto sledva:");                                         
    		for (int p : producti) {                                                                                                              //Tuka se smqta cenata za otdelen produkt
    			System.out.println(p * (cena / ob6tokoli4estvo));
    		}
    		System.out.println("Blagodarq 4e izpolzvahte moqta programa moje da mi napravite malko darenie, nomera na smetka mi e: ...");      //A tova e nai-vajnata 4ast ot programata
    	}
    }

    , VBA Excel- , , ...
    Last edited by atom3; 26th April 2017 at 21:45.
    Alienware 17 R4, i7-6700hq, gtx-1060 OC, 16gb ddr4 2667 ram 256gb NVMe SSD, LSP, MMS, GPRS, UPS, FedEx, ZDR, kopr?, asl, W2F, ... .

  3. #3
    Deleted User 4eRNoBiL's Avatar
    Join Date: Oct:2005
    Location:
    Posts: 739
    .

    (x;y;r;a;s;t;v) - , ? ? , . ? (x;y;r;a;s;t;v) ?

    "k" "L" ? , ""?

    "" , 7 , "" ? "" ?

    - - ? ?

    () , .
    Fujistu Lifebook E756 | Core i7-6500U / 400MHz-3.1GHz | 8 GB DDR4-2133 | Samsung PM871 / 256 GB SSD | 15" 1920x1080 | Manjaro Linux + kernel 4.19

  4. #4
    Registered User
    Join Date: Nov:2009
    Location:
    Posts: 783
    (x;y;r;a;s;t;v)- , fd,fc,fr,fa,fs,fg,fm ( );qd,qc,qr,qa,qs,qg- .
    - - , - L;
    (x;y;r;a;s;t;v);
    p- (), , ... (x=1;y=0;r=0;a=0;s=0;t=0;v=0)

    : , . -( ), (x;y;r;a;s;t;v) . - qd,qc,qr,qa,qs,qg -fd,fc,fr,fa,fs,fg,fm , ... - , .

    visual basic, , userform, ...

  5. #5
    Registered User
    Join Date: Jul:2009
    Location: Bulgaria
    Posts: 848
    excel , , 15 . visual basic .
    Last edited by atom3; 27th April 2017 at 16:23.
    Alienware 17 R4, i7-6700hq, gtx-1060 OC, 16gb ddr4 2667 ram 256gb NVMe SSD, LSP, MMS, GPRS, UPS, FedEx, ZDR, kopr?, asl, W2F, ... .

  6. #6
    Deleted User 4eRNoBiL's Avatar
    Join Date: Oct:2005
    Location:
    Posts: 739
    , .

    , , . .

    , , , . , .

    ( Q). , ? , , .

    :
    hartia.xlsx.zip
    Fujistu Lifebook E756 | Core i7-6500U / 400MHz-3.1GHz | 8 GB DDR4-2133 | Samsung PM871 / 256 GB SSD | 15" 1920x1080 | Manjaro Linux + kernel 4.19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |