G
Guest
Dear friends i have a problem with Vba moudle let me give u the detail about
it
suppose i have a sheet where i have given the label to various column like
column a1 = item
columnb1=price
columnc1=tax
so i have defined a module for it.
Public Function price(item)
If (item = "oranges") Then
price = 100
tax = 0.2
ElseIf (item = "Mango") Then
price = 200
tax = 0.5
End If
End Function
so when i return to my Excel sheet
item tax price
apple =price(a2) "where a2 equal to apple
under item column"
it give me the price 100 for apple but it don't give me the tax 0.2 so i
need it too .
plz help me. how to make it correct.
thanks .
i am looking forward to someone to help me .
it
suppose i have a sheet where i have given the label to various column like
column a1 = item
columnb1=price
columnc1=tax
so i have defined a module for it.
Public Function price(item)
If (item = "oranges") Then
price = 100
tax = 0.2
ElseIf (item = "Mango") Then
price = 200
tax = 0.5
End If
End Function
so when i return to my Excel sheet
item tax price
apple =price(a2) "where a2 equal to apple
under item column"
it give me the price 100 for apple but it don't give me the tax 0.2 so i
need it too .
plz help me. how to make it correct.
thanks .
i am looking forward to someone to help me .