本文介绍了这是什么意思?它会做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

子收据()



Dim N As String

Dim D As Date

Dim Q As整数

Dim P As Currency

Dim TC as Currency

Dim Disc As String



Q =范围(C4)。值

P =范围(C5)。值



TC = Q * P



Cells(7,3).Value = TC



如果P> 100然后

细胞(8,3).Value =下次再带回20%优惠!

其他:细胞(8,3).Value = 下次再退还10%!

结束如果



End Sub



我尝试了什么:



我只是想了解这些东西是如何运作的。这将做什么?

Sub Receipt()

Dim N As String
Dim D As Date
Dim Q As Integer
Dim P As Currency
Dim TC As Currency
Dim Disc As String

Q = Range("C4").Value
P = Range("C5").Value

TC = Q * P

Cells(7, 3).Value = TC

If P > 100 Then
Cells(8, 3).Value = "Bring this back next time for 20% off!"
Else: Cells(8, 3).Value = "Bring this back next time for 10% off!"
End If

End Sub

What I have tried:

I am just wanting to understand how this stuff works more. What will this do?

推荐答案


这篇关于这是什么意思?它会做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 08:30