Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel Formula Syntax
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00828375
Message ID:
00828471
Vues:
11
Hello Yuri,

I guess I got the "=SUM" function from Tamar Granor's book, and it has worked for me in the past.

I finally got the formula to work by assiging the form property values to variables and using them in the "sum" formula rather than the from properties themselvs.

Heres the results:

msalepool = thisform.r_salepool
msyn = thisform.r_syn

oexcel.activesheet.range("c4:c" + ltrim(str(ntotalrow))).formula ;
= "=sum(" + LTRIM(STR(msalepool))+'/'+LTRIM(STR(msyn))+"*b4)"

I just can't seem to get the right "syntax" when using form properties in a formula, but the above works so I'm happy :)

Thanks for the help.

Jim


>Not quite clear, why do you use SUM here? Check out this:
>oexcel.activesheet.range("c4:c" + ltrim(str(ntotalrow))).formula = ;
>"="+trans(thisform.r_salepool)+"/"+trans(thisform.r_syn)+"*B4"
>
>
>>Hi All,
>>
>>I can't seem to get the correct "syntax" for this formula.
>>
>>oexcel.activesheet.range("c4:c" + ltrim(str(ntotalrow))).formula = "=SUM("+thisform.r_salepool+"/"+thisform.r_syn+"*b4)"
>>
>>Apparently the form's propertie's values are not being read properly and the cells in the third("C") column have no values and no formula.
>>
>>thisform.r_salepool = $600,000 && fees collected
>>
>>thisform.r_syn = 23 && pooled bookings
>>
>>The cell B4 contains a value which represents the number of pooled bookings out of the total of 23.
>>
>>(ie; 600000/23*2=$52,173.00
>>
>>
>>I've tried many different variations with no luck.
>>
>>I'd appreciate it if someone could steer me in the right direction on how to correctly list the form properties.
>>
>>TIA
>>
>>Jim Harvey
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform