Subtraction

I play a board game with some friends that involves keeping track of different players health. I want to be able to enter their total health at the top of a column, then, in the boxes below, I want to be able to enter in different numbers for when they get hit, and I want Numbers to subtract each of those numbers from the total so that the total health left appears at the bottom. I thought this was an easy function, I guess I was wrong. So, after typing in the number representing the total possible health for one player in A1, in cell A10 I typed: =A1-(A2:A9). Numbers tells me that "the range A2:A9 can't be used as a single value. I'm certainly no expert but I thought I remembered how to do this. What am I missing?

=A1-SUM(A2:A9)
may be the correct formula.
Yvan KOENIG (VALLAURIS, France) lundi 28 décembre 2009 18:03:52

Similar Messages

  • Query help, subtract two query parts

    Hi,
    I am beginner of PL/SQL and have a problem I couldn’t solve:
    Table (op_list):
    Item     -     Amount -     Status
    Item1     -     10     -     in
    Item2     -     12     -     in
    Item3     -     7     -     in
    Item1     -     2     -     out
    Item2     -     3     -     out
    Item1     -     1     -     dmg
    Item3     -     3     -     out
    Item1     -     2     -     out
    Item2     -     5     -     out
    Item2     -     2     -     in
    Item3     -     1     -     exp
    Would like to get result of query (subtract amount of 'out/dmg/exp' from 'in' ):
    Item - Amount left
    Item1     -     5
    Item2     -     6
    Item3 -     3
    I wrote code that returns sum of all incoming items and sum all out/dmg/exp items, but couldn’t solve how to subtract one part of querry from another. Or maybe there is a better way. Also worried what happens if there is no 'out/dmg/exp' only 'in'
    select item.name, sum(op_list.item_amount)
    from op_list
    inner join item
    on op_list.item = item.item_id
    where op_list.status = 'in'
    group by item.name
    union
    select item.name, sum(op_list.item_amount)
    from op_list
    inner join item
    on op_list.item = item.item_id
    where op_list.status = 'out'
    or op_list.status = 'dmg'
    or op_list.status = 'exp'
    group by item.name
    Return:
    Item1     -     10      [10 in]
    Item1     -     5     [2+1+2]
    Item2     -     14     [12+2]
    Item3     -     7
    Item3     -     4     [3+1]
    Thanks in advance

    Hi,
    We can also use simple inline views to get what we need.
    select a.item,a.amount-b.amount Balance from
    (select item,sum(amount) Amount from op_list
    where status = 'in'
    group by item) a,
    (select item,sum(amount) Amount from op_list
    where status in ('out','dmg','exp')
    group by item) b
    where
    a.item=b.item
    order by item;
    ITEM       BALANCE
    Item1                      5
    Item2                      6
    Item3                      3Regards,
    Prazy

  • Subtract two characters in a query

    Hi Experts,
    I want to know how to subtract two characters in a query could you please give me the solution regarding this.
    Ex: posting date - Document date
    Regards,
    Krish

    Hi,
    this can be achieved by creating two formula variables for 2 chars with replacement path and do a subtraction.
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
    Assign points if this is helpful...........
    Rgs,
    I.R.K

  • How to add or subtract in FDM

    Hi,
    I am developing a FDM application and I am quite new to it. Need a help on one of the operation that I need to do in FDM.
    Source: ESSBASE ASO application
    Target: ESSBASE BSO applcation.
    I will be getting file from ASO cube which contains data corresponding to different Management entities.
    Now I have to load this data to a BSO cube after performing some operations in FDM ..eg. I am required to add up data corresponding to few Management Entities and than load it to BSO cube by applying some mappings. In another scneriao I am required to subtract the data corresponding to two management entities and than load it to BSO cube. there are 10-12 different cases like this in the file.
    Would appriciate your help on this. How this can be achieved?

    Please close this thread as another one asking the same question is already being progressed
    adding and subtracting data in FDM while loading

  • Trying to subtract a complex path from another, can't get the result I need

    I'd really appreciate some help on this. I'm not familiar with illustrator and am stuck trying to accomplish what I hope is an easy task. I've uploaded my .ai here just in case anyone can help.
    I have two layers, one is a collection of lines/paths which make up a line drawing of a tree, then the layer above that is a bunch of paths using a 'distressed' brush. I've read several tutorials on using the pathfinder tool to subtract one from the other but every time I'm left with way more of the tree deleted than I want. I tried a simple test case (subtracting a single distressed path from a rectangle shape) and it worked as expected. I don't know why this one isn't working other than maybe it's just too complex.
    On the left (tempoary red background) is what my layers look like, on the right is the effect I'm trying to achieve (the white parts removed from the black parts). I need this to end up being a vector so it can get cut out of a vinyl decal.
    Thanks a ton for any help, I'm really stuck on this as I spent 99% of my time in photoshop.

    That worked perfectly, thank you. I selected everything on the tree layer, made compound path, then did the same on the texture layer. Then the subtract worked great.
    Just so I understand what's going on here - make compound path means take all the selected stuff and make it into one single shape/path, vs. having a bunch of separate paths on the same layer?
    Really appreciate your help, thanks again.

  • Subtracting in ALV report

    i have a FI report where i am showing Assets and liabilities value in ALV format, i m using ALV grid layout. there i can easily add those values, but my problem is i have to subtract liabilities value from Assets value, but in ALV i do not find any option to Subtract values between those criteria. so my question is: Is there any option or function in ALV report where we can Subtract, multiply, division between the values in the table?

    hiiiiiiiiiiiiiii
    try to do this
    multiply any one of field by -1
    for ex: 
    loop at itab.
          multiply  itab_field  by -1.
        endloop
    and then add in alv report may this subtracted
    or
    initialize substraction field in itab
    do substracion of these tow fields append the result to itab and display it
    if u want substraction at last
    write in loop
    at last of itab
    do substraction
    i think ,
    may this solve ur problenm

  • Logic For Subtracting A Given Output In ALV Report

    Hi,
    I am working on a report in which i am using ALV Concept and there a problem arise i.e. in ALV Report output which always subtotals having values in addition only and i want to know is there any way through which subtraction can also be performed within the output of a ALV Report.
    Please provide some guidelines for it.
    Regards,
    Rickky NV

    Hi,
    Thanks to both of you for your value able response. Actually, i am working on customer aging analysis report in which there are 2 columns i.e. debit and credit in which these both values are stored in 2 separate lines  and i have to display the difference of them in the 3rd column and facing the problem.
    Is it possible to display the required data of it in 3rd column  of it? 
    Regards,
    Ricky

  • Can I use one waveform to subtract from the other one in labview?

    Here is the thing.
    I am using DAQ to aquire amplified signal to measure its noise of output.However DAQ would contribute a little noise to the whole system.My thinking is to capture two waveforms of noise from DAQ itself and the whole system(amplified circuit and DAQ) and then make the subtration calculation between them.Is it possible to make it with labview?How?
    Or can I aquire two groups of signal using DAQ at the same time? If it can't be realised is there some other way?
    Thanks

    If I'm reading you right I don't think your original concept is valid.  If you have already done a good job with wiring, shielding, etc.  You won't be able to simply subtract a data collection of "just noise" from a collection of "noise plus signal" and expect the noise to cancel itself out.  It's random.  A better method would be to collect the same signal several times and then average the results.  Even that will only reduce repetitive components in the noise.
    As smercurio said however, the most important consideration is to make sure your connection method, grounding, shielding, timing, etc is top notch to prevent noise from contaminating the signal in the first place.  I generally use differential signals through good quality twisted pairs with the shield connected on the DAQ side only (to prevent ground loops).
    Using LabVIEW: 7.1.1, 8.5.1 & 2013

  • Subtract a workpath selection from a larger workpath

    my job prohibits me from sharing images so if needed i can make a quick sketch if i can't get my question across clear enough.
    here is what i have.
    the image is a stack of objects and i have made a work path of all the objects (one large selection labeled "All" around all objects to isolate away from background), then i have another work path of just the bottom object (labeled "Bottom").
    my goal.
    i do this quite often, so i'd like to be able to just subtract the "bottom" work path selection from the larger "All" work path selection.
    Thanks
    p.s. i tried all the FAQ and search before posting.

    Thanks, I knew there was a quick command for that, I searched and searched and couldn't find it.. I have done it before too, just not in a while. As for the deleting layer content, i agree for the most part but in this case it doesn't matter in this case since I only end up with one (all original from the photographer) layer at the end and don't save in a format that supports masks.
    Thanks for your quick response and helping me make an easy and more accurate work path!

  • How do I subtract two fields in a form?

    I am working on an expense form and I have everything working except one thing.
    We have to subtract any over payments from previous expense reports on the current expense report. I am looking at the calculate tab of the Text Field Properties.  But I do not see a way to subtract my two fields.
    I then setup a field that contains a negative one, except when I display the field on the form, the negative one is a positive one.  I did enter -1 as the default value to my "subtraction" field.  I was then going to multiple negative 1 against the the over payment amount so I could get a negative over payment amount.  I was then going to add the negative over payment amount to the total due and arrive at a net due,  But this does not work.
    Here is the calculation I am trying to do:
    Total Expenses     (calculated field from all of the preceding fields.)
    Deductible Expense       (user entered)
    Net Expense check          (Total Expense - Deductible expense).
    Can anyone tell me how to do this?
    thanks,
    Dennis

    With Acrobat there are 3 calculations options.
    "The field is the ____ of the following fields:" options are for sum, product, average, min, and max operations or for actions that could be repeated over multiple fields. One does not usually subtract or divide multiple fields in on action.
    "Simplified field notation" uses only field names and values. Field names must start with an alphabetic character and should not have any spaces or special characters. Cannot perform conditional control statements or functions. Special characters or spaces can be in field names if the JavaScript escape character precedes the special character or space. The 4 arithmetic operations can be performed.
    "Custom JavaScript calculation" has no restrictions on field names, control statements, functions or mathematical operations. One needs to access the field object and the value property of the field object.

  • Subtracting a Credit Memo from Invoice

    I have looked all over the forum for the right answer and cant locate what I need.
    I am witting a Royalty Report and need to find the best way to subtract credit memo's from invoices.
    I know that the OINV.DocEntry = RIN1.BaseEntry but the numbers are not correct.
    If anyone can help on a query or more info on the best way to do this I award points..
    Thanks,
    Craig

    hi,
    Check this links
    LINKING CREDIT MEMO TO INVOICE
    Credit Memo and A/R Invoice linking
    Jeyakanthan

  • Subtracting Columns from Import File Using Import Script

    The file I am importing to FDM contains two amount columns, 1 Debit, 1 Credit. I want to have the Amount field populate as the Debit minus Credits. I have attempted an import script that is giving me an error in the bolded line:
    Function GBS_Amount(strField, strRecord)
    'Oracle Hyperion FDM Integration Import Script:
    'Created By:     
    'Date Created:     
    'Purpose:
    'Set variables
    dim strNatural
    dim strCurmnthDR
    dim strCurmnthCR
    dim strCurAmount
    'Store the Natural Account as Column 1 of 11 of a comma delimited file
    strNatural = Trim(DW.Utilities.fParseString(strRecord, 11, 1, ","))
    'Store the Current Month Debit Amount as Column 7 of 11 of a comma delimited file
    strCurmnthDR = Trim(DW.Utilities.fParseString(strRecord, 11, 7, ","))
    'Store the Current Month Credit Amount as Column 8 of 11 of a comma delimited file
    strCurmnthCR = Trim(DW.Utilities.fParseString(strRecord, 11, 8, ","))
    'Calculate the YTD Amount
    strCurAmount = strCurmnthDR - strCurmnthCR
    GBS_Amount = strCurAmount
    End If
    End Function
    What syntax do I need to use to subtract two defined variables?

    Hi Experts,
    I have a similar situation,I am trying to import the Multiple amount columns to be addedd and imported as one amount column.Below is the script I am using for the same,script is getting verified in Script editor but When I am trying to Load the File in import, I am gettig an error as below.but if I try to import without using the script for the amount, inport is getting done.I have attached script to amount column only.
    ERROR
    Code............................................. 9
    Description...................................... Subscript out of range
    Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 8380
    Scirpt being used
    Function Import_YTD(strField, strRecord)
    'Set variables
    dim strCurmnth1
    dim strCurmnth2
    dim strCurmnth3
    dim strCurmnth4
    dim strCurmnth5
    dim strCurmnth6
    dim strCurmnth7
    dim strCurmnth8
    dim strCurmnth9
    dim strCurmnth10
    dim strCurmnth11
    dim strCurmnth12
    dim strCurAmount
    strCurmnth1 = Trim(DW.Utilities.fParseString(strRecord, 20, 9, ","))
    strCurmnth2 = Trim(DW.Utilities.fParseString(strRecord, 20, 10, ","))
    strCurmnth3 = Trim(DW.Utilities.fParseString(strRecord, 20, 11, ","))
    strCurmnth4 = Trim(DW.Utilities.fParseString(strRecord, 20, 12, ","))
    strCurmnth5 = Trim(DW.Utilities.fParseString(strRecord, 20, 13, ","))
    strCurmnth6 = Trim(DW.Utilities.fParseString(strRecord, 20, 14, ","))
    strCurmnth7 = Trim(DW.Utilities.fParseString(strRecord, 20, 15, ","))
    strCurmnth8 = Trim(DW.Utilities.fParseString(strRecord, 20, 16, ","))
    strCurmnth9 = Trim(DW.Utilities.fParseString(strRecord, 20, 17, ","))
    strCurmnth10 = Trim(DW.Utilities.fParseString(strRecord, 20, 18, ","))
    strCurmnth11 = Trim(DW.Utilities.fParseString(strRecord, 20, 19, ","))
    strCurmnth12 = Trim(DW.Utilities.fParseString(strRecord, 20, 20, ","))
    If strCurmnth1="" Then strCurmnth1="0" End If
    If strCurmnth2="" Then strCurmnth2="0" End If
    If strCurmnth3="" Then strCurmnth3="0" End If
    If strCurmnth4="" Then strCurmnth4="0" End If
    If strCurmnth5="" Then strCurmnth5="0" End If
    If strCurmnth6="" Then strCurmnth6="0" End If
    If strCurmnth7="" Then strCurmnth7="0" End If
    If strCurmnth8="" Then strCurmnth8="0" End If
    If strCurmnth9="" Then strCurmnth9="0" End If
    If strCurmnth10="" Then strCurmnth10="0" End If
    If strCurmnth11="" Then strCurmnth11="0" End If
    If strCurmnth12="" Then strCurmnth12="0" End If
    'Calculate the YTD Amount
    strCurAmount = CDbl(strCurmnth1) + CDbl(strCurmnth2) + CDbl(strCurmnth3) + CDbl(strCurmnth4) + CDbl(strCurmnth5) + CDbl(strCurmnth6) + CDbl(strCurmnth7) + CDbl(strCurmnth8) + CDbl(strCurmnth9) + CDbl(strCurmnth10) + CDbl(strCurmnth11) + CDbl(strCurmnth12)
    Import_YTD =strCurAmount
    End Function

  • Subtraction in the pricing procedure.

    Hello Friends,
                 I have requirement as follows:
    I have two steps in the pricing procedure. One has a condition type and the other does not. Now my requirement is to subtract the condition price of step 1 from the condition price of step 2 and display it as the condition price for step 3 which has no condition type.
    I have been suggested to create a new routine in vofm and assign that in the pricing procedure.
    Is there any otherv way of doing this?
    If not, how we design the code to get the values from the structure KOMV for the field KWERT for different steps to calculate and update in the rpicing procedure?
    Can u please guide me.

    and display it as the condition price for step 3 which has no condition type
    In SD, unless you have a condition type, you cannot show it as a pricing since it has an impact in FI via Account Key and G/L Account assignments.  Please explain more about the Business Process and how you want to capture.  Dont go for VOFM and all when the process can be configured via standard.
    G. Lakshmipathi

  • Subtraction for Adobe Acrobat 9 Pro Extended

    I have an Order Form (originally I downloaded it and didn't have the Fill In Options), I made it into the Fill In version of a PDF.  What I'd like to do is to have the TOTAL - CREDIT ENCLOSED= TOTAL ENCLOSED.  In the drop down list all I see are:  sum (+), product (x), average, minimum and maximum.  Is there a customized script in order to do subtraction in Acrobat?

    If those are your field names, you will need to create a custom calculation script. For the 'TOTAL ENCLOSED' field you could use the following script:
    event.value =  this.getField('TOTAL').value - this.getField('CREDIT ENCLOSED').value;
    This assumes you are using AcroForms and not LiveCycle Designer. If you are using LiveCycle Designer, please look at the 'Scripting Reference' under the 'Help' menu option.

  • Click event to add (or subtract) a day to a date field

    I have a form that is giving me a little trouble. I want to be able to input a start date in one field, then input a number of days in another field, and then have it calculate a date that is that number of days away from the start date. The form is actually working ok for the most part, but there are a couple of issues I'm having.
    1. The end date is not calculating immediately upon exiting the number of days field. You have to tab all the way back to the start date and only when you exit that field does it calculate the end date. I need it to calculate when you exit the number of days field.
    2. I have added a little (+) and (-) button to be able to increase or decrease the date by one day. This works, but the problem is, I want to do this in the background. Meaning, I want the calculated date to change, but the # of days field to not change.
    So say I enter 12/1/2010 in the start date. Then I enter 1 in the # of days field. When I tab to the Calculated date field, it should immediately change to 12/2/2010. Then, if I click (+), the Calculated date field should go up to 12/3/2010, but the # of days field should stay at 1.
    I've uploaded a sample of what I have figured out so far here:
    https://acrobat.com/#d=v4c4KKdj0hesicxO8yO1pw
    Thanks so much for any help I can get on this!
    Jo

    I think this is what you are after. I moved the logic to the calculate event of the target date and added a numeric field to hold the result of adding/subtracting (called 'delta').
    // form1.#subform[0].date2::calculate - (FormCalc, client)
    var date1 = Date2Num(date1.formattedValue,"MM/DD/YYYY")
    $.rawValue = Num2Date(date1+days+delta,"MM/DD/YYYY")
    You could make 'delta' hidden.
    Steve

  • How can I allow a customer to enter an amount in a box and subtract it from a total

    I'm new to lifecycle so I need some help. I figured out how to create the form I wanted but there is one thing I am stuck on and I know someone knows how to do this. It's probably so easy but I am stuck. If you go to the form I created you will see three drop down menus. If you just make a selection you will see the total show up in the "total package cost" box. I want to be able to manually enter a "discount" and then have that subtracted from the total. The script for the "Total Package Cost" is this.rawValue = NumericField1.rawValue+NumericField2.rawValue+NumericField3.rawValue. The "Discount" box is NumericField5. What should I do allow me to enter a number in the discount field and have it automatically subtract from the total field? I hope that's no too confusing. The file in question is at http://www.premierweddings.tv/contractform2010.pdf

    Marc,
    Modify the Total Package Cost script to subtract the discount.
    this.rawValue = NumericField1.rawValue + NumericField2.rawValue + NumericField3.rawValue - NumericField5.rawValue;
    Steve

Maybe you are looking for