zoukankan      html  css  js  c++  java
  • 1*SUM(i) 开源社区

    w 算法优化

    Cells(i, "Y") + Cells(i, "Z") * 0.2 多计算了一次
    是 1*SUM(i)次

    Sub 订单利润()
    Dim Adjustment, FBA_W_Fee, W_Deal_Fee, Order, Refund, Service_Fee, Transfer As Integer, i As Integer
       i = 2
       Do
       Select Case Cells(i, "C")
       Case Is = Adjustment
               Cells(i, "AA") = 0
       Case Is = FBA_W_Fee And W_Deal_Fee And Service_Fee
               Cells(i, "AA") = Range(Cells(i, "V"))
       Case Is = Order
            If Cells(i, "X") = "" Then
             Cells(i, "AA") = 0
            Else
               Cells(i, "AA") = Range(Cells(i, "Z")) - Range(Cells(i, "Y")) * Range(Cells(i, "G"))
               End If
       Case Is = Refund
               If (Range(Cells(i, "Y")) + Range(Cells(i, "Z"))) * 0.1234 < 0 Then
                  Cells(i, "AA") = (Range(Cells(i, "Y")) + Range(Cells(i, "Z"))) * 0.1234
                  Else
                  Cells(i, "AA") = 0
               End If
       Case Is = Transfer
               Cells(i, "AA") = 0
       End Select
       i = i + 1
          Loop Until Cells(i, "C") = ""
    End Sub
    
    Sub 订单利润0()
    Dim Adjustment, FBA_W_Fee, W_Deal_Fee, Order, Refund, Service_Fee, Transfer As Integer, i As Integer
       i = 2
       Do
            Cells(i, "AA") = 1000
       i = i + 1
          Loop Until Cells(i, "C") = ""
    End Sub
    
    Sub 订单利润1()
    Dim Adjustment, FBA_W_Fee, W_Deal_Fee, Order, Refund, Service_Fee, Transfer As Integer, i As Integer
       i = 2
       Do
          Select Case Cells(i, "C")
       Case Is = "Adjustment"
               Cells(i, "AA") = 12
       End Select
       i = i + 1
          Loop Until Cells(i, "C") = ""
    End Sub
    
    Sub 订单利润2()
    Dim Adjustment, FBA_W_Fee, W_Deal_Fee, Order, Refund, Service_Fee, Transfer As Integer, i As Integer
       i = 2
       Do
          Cells(i, "AA") = 0
        Select Case Cells(i, "C")
       Case Is = "Adjustment"
               Cells(i, "AA") = 12
       End Select
       i = i + 1
          Loop Until Cells(i, "C") = ""
    End Sub
    
    
    Sub 订单利润3()
    Dim Adjustment, FBA_W_Fee, W_Deal_Fee, Order, Refund, Service_Fee, Transfer As Integer, i As Integer
       i = 2
       Do
          Cells(i, "AA") = 0
        Select Case Cells(i, "C")
       Case Is = "Adjustment"
               Cells(i, "AA") = 12
       End Select
       i = i + 1
          Loop Until Cells(i, "C") = ""
    End Sub
    
    Sub 订单利润4()
    Dim Adjustment, FBA_W_Fee, W_Deal_Fee, Order, Refund, Service_Fee, Transfer As Integer, i As Integer
       i = 2
       Do
          Cells(i, "AA") = 0
        Select Case Cells(i, "C")
       Case Is = "Adjustment"
               Cells(i, "AA") = Cells(i, "V")
       End Select
       i = i + 1
          Loop Until Cells(i, "C") = ""
    End Sub
    
    
    
    Sub 订单利润5()
    Dim Adjustment, FBA_W_Fee, W_Deal_Fee, Order, Refund, Service_Fee, Transfer As Integer, i As Integer
       i = 2
       Do
          Cells(i, "AA") = 0
        Select Case Cells(i, "C")
       Case Is = "FBA Inventory Fee"
               Cells(i, "AA") = Cells(i, "V")
       End Select
       i = i + 1
          Loop Until Cells(i, "C") = ""
    End Sub
    
    Sub 订单利润6()
    Dim Adjustment, FBA_W_Fee, W_Deal_Fee, Order, Refund, Service_Fee, Transfer As Integer, i As Integer
       i = 2
       Do
          Cells(i, "AA") = 0
        Select Case Cells(i, "C")
       Case Is = "FBA Inventory Fee"
                Cells(i, "AA") = Cells(i, "V")
       Case Is = "W Deal Fee"
                Cells(i, "AA") = Cells(i, "V")
       Case Is = "Service Fee"
                Cells(i, "AA") = Cells(i, "V")
       End Select
       i = i + 1
          Loop Until Cells(i, "C") = ""
    End Sub
    
    Sub 订单利润7()
    Dim Adjustment, FBA_W_Fee, W_Deal_Fee, Order, Refund, Service_Fee, Transfer As Integer, i As Integer
       i = 2
       Do
          Cells(i, "AA") = 0
        Select Case Cells(i, "C")
       Case Is = "FBA Inventory Fee"
                Cells(i, "AA") = Cells(i, "V")
       Case Is = "W Deal Fee"
                Cells(i, "AA") = Cells(i, "V")
       Case Is = "Service Fee"
                Cells(i, "AA") = Cells(i, "V")
       Case Is = "Order"
                If Not IsError(Cells(i, "X")) Then
                    Cells(i, "AA") = Cells(i, "Z") - Cells(i, "Y") * Cells(i, "G")
                End If
       Case Is = "Refund"
                If Cells(i, "Y") + Cells(i, "Z") * 0.1234 < 0 Then
                    Cells(i, "AA") = Cells(i, "Y") + Cells(i, "Z") * 0.1234
                End If
       End Select
       i = i + 1
          Loop Until Cells(i, "C") = ""
    End Sub
    
    Sub 订单利润8()
    Dim Adjustment, FBA_W_Fee, W_Deal_Fee, Order, Refund, Service_Fee, Transfer As Integer, i As Integer
       i = 2
       Do
          Cells(i, "AA") = 0
        Select Case Cells(i, "C")
       Case Is = "FBA Inventory Fee", "W Deal Fee", "Service Fee"
                Cells(i, "AA") = Cells(i, "V")
       Case Is = "Order"
                If Not IsError(Cells(i, "X")) Then
                    Cells(i, "AA") = Cells(i, "Z") - Cells(i, "Y") * Cells(i, "G")
                End If
       Case Is = "Refund"
                If Cells(i, "Y") + Cells(i, "Z") * 0.1234 < 0 Then
                    Cells(i, "AA") = Cells(i, "Y") + Cells(i, "Z") * 0.1234
                End If
       End Select
       i = i + 1
          Loop Until Cells(i, "C") = ""
    End Sub
    
    
    
    Sub 订单利润9()
    Dim i As Integer
       i = 2
       Do
          Cells(i, "AA") = 0
        Select Case Cells(i, "C")
       Case Is = "FBA Inventory Fee", "W Deal Fee", "Service Fee"
                Cells(i, "AA") = Cells(i, "V")
       Case Is = "Order"
                If Not IsError(Cells(i, "X")) Then
                    Cells(i, "AA") = Cells(i, "Z") - Cells(i, "Y") * Cells(i, "G")
                End If
       Case Is = "Refund"
                If Cells(i, "Y") + Cells(i, "Z") * 0.1234 < 0 Then
                    Cells(i, "AA") = Cells(i, "Y") + Cells(i, "Z") * 0.1234
                End If
       End Select
       i = i + 1
          Loop Until Cells(i, "C") = ""
    End Sub
  • 相关阅读:
    异常处理
    弹出对话框
    ef——存储过程
    事务
    linq——常用方法
    Linq
    asp get与post获取的区别
    Web服务的调用
    AJAX控件——多层弹出Accordion
    数据绑定
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6746613.html
Copyright © 2011-2022 走看看