• subtraction (in cells)

    From timepro timesheet@21:1/5 to All on Tue Dec 28 02:04:16 2021
    in xcel, how to syntax:

    osheet:cells(12,3):value:=str((cell(3,16)-cell(5,14))*cell(19,22),14,3)

    thanks

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From poopall@21:1/5 to timec...@gmail.com on Wed Dec 29 17:49:04 2021
    On Tuesday, 28 December 2021 at 9:04:17 pm UTC+11, timec...@gmail.com wrote:
    in xcel, how to syntax:

    osheet:cells(12,3):value:=str((cell(3,16)-cell(5,14))*cell(19,22),14,3)

    thanks

    oSheet:Cells( 12, 3 ):Formula = "+P3-(N5*V19)"

    The formula needs to be a string that looks identical to the way you would write it in Excel Cell

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From timepro timesheet@21:1/5 to poopall on Fri Dec 31 22:12:47 2021
    On Thursday, December 30, 2021 at 7:19:05 AM UTC+5:30, poopall wrote:
    On Tuesday, 28 December 2021 at 9:04:17 pm UTC+11, timec...@gmail.com wrote:
    in xcel, how to syntax:

    osheet:cells(12,3):value:=str((cell(3,16)-cell(5,14))*cell(19,22),14,3)

    thanks
    oSheet:Cells( 12, 3 ):Formula = "+P3-(N5*V19)"

    The formula needs to be a string that looks identical to the way you would write it in Excel Cell

    thanks poopall,

    is there a syntax, instead of :Formula="P3-(N...
    i can code :Formula="cell(3,16)-cell(5,14)*...

    else, i will have to get the values from a udf:
    func converttoalpha(var)
    if var=1
    xcol='A'
    elseif var=2
    xcol='B'
    elseif var=27
    xcol='AA'
    ...
    ...
    end
    retu xcol
    OR
    create a multidim array 1,A ; 2,B; 3,C .....27,AA...and then xcol=ascan(...

    and then:
    xcolrow=xcol+alltrim(str(xrow,2))
    oSheet:Cells(xx,yy):Formula = "&xcolrow-(&xcolrow1*&xcolrow2)..."

    also, only after the report is processed, it can determine what will be the last column...
    -so cannot decide how may combinations(1,A...) to be stored in the array...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From timepro timesheet@21:1/5 to All on Sat Jan 1 01:14:26 2022
    thanks poopall:

    *how do define/syntax a variable in 'sum' or 'formula'

    code:
    AGSSTAX=(netttax/currentsales)-commission && (almost always 18.00) oSheet:cells(T16):value="=(sum("+"P16"+")"+"-sum("+"Q16"))"+"*3"+"-sum("+"R16+")"+"/AGSSTAX"

    output:
    T16 cell shows =(SUM(P16)-SUM(Q16))*3-SUM(R16)/AGSSTAX

    does not convert 'agsttax' to it's value (for every cell agsstax value may be different/same)
    (even :formula="P... shows 'agsstax' as a string not the value)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)