Using several checkboxes in a formula

Hi,
I have a sheet with three columns; Price, Name1, Name2. Name1 and Name2 have checkboxes on every row where there's a price added.
I then have a two cells further away that are trying to calculate the price for each name. Eg. if the price is 100 and Name1's checkbox is ticked and not Name2's checkbox, it will add 100 to name 1. If they are both checked it'll add 50 (100/2).
My formula for Name1's total sum is: "=SUMIF(Name1,TRUE,Price/IF(Name2,2,1))"
However it says that "SUMIF requires that all range arguments are the same size". It appears that when using the IF in SUMIF Name2's range is being started from row 1 and now row 2 like Price and Name1.
Regards
David

I'm not sure that I correctly understood your proposal.
Here is mine:
In cells of column E the formula is:
=IF(AND(C=TRUE,D=TRUE),0.5,IF(OR(C=TRUE,D=TRUE),1,0))
In G2 it is:
=SUMIFS($B,C,TRUE,$E,1)+(SUMIFS($B,C,TRUE,$E,0.5)/2)
In H2 fill to right gives;
=SOMME.SIS($B;D;VRAI;$E;1)+(SOMME.SIS($B;D;VRAI;$E;0,5)/2)
Yvan KOENIG (from FRANCE mardi 4 août 2009 22:48:35)

Similar Messages

  • Is there a way to delete one of several checkboxes from a pdf form without the leftover checkboxes automatically renumbering themselves?

    Is there a way to delete one of several checkboxes from a pdf form without the leftover checkboxes automatically renumbering themselves?
    I used LiveCycle Designer to make a pdf form with many checkboxes. When I deleted a few of the checkboxes the rest left on the form renumbered themselves. This made my JavaScript out of sync since the JavaScript checkbox numbers did NOT update automatically. I am hoping there is a preference option to not auto update. I just cannot find it,

    I believe you're using the same name for each checkbox, right?!
    If so, each checkbox has an index number which represents its position relative to the other copies in the XML tree and when you add, delete or reorder the copies the index will always be recreated because thats the way how XML works.
    There is no way to stop Designer from doing this, I'm afraid.
    To address individual objects through JavaScript you should use unique names.

  • Using a checkbox in numbers- if,then, I want to display today's date if checked, and keep that date, the day it was checked, not the current day

    Using a checkbox in numbers- if,then, I want to display today's date if checked, and keep that date, the day it was checked, not the current day

    this will not work.  Numbers does not provide a timestamp.  you can, however, enter the formula "=now()" in any cell, then copy that same cell, then paste (using the command "Edit > Paste Formula Results"
    If you need a time stamp often,
    make a single cell table with the formula (mentioned earlier).
    and copy and paste as needed

  • How to use user variable in Member Formula

    Hi All
    I have to write a member formula for %linearity quarter for a weekly application.This member will be used in reports and we do not want to do this calculation in reports, hence need to write member formula. The formula is
    Week1 of Q1 forecast / Q1 Total Forecast , Week2 of Q1 Forecast/ Q1 Forecast.............,Week15 of Q2 forecast/ Q2Total Forecast.......and so on.
    According to me it should work in the below mentioned manner , but need help in improvising the formula.
    If(@ismbr("Weeks1") or @ismbr("Weeks2") or @ismbr("Weeks3") or @ismbr("Weeks4") or @ismbr("Weeks5") or @ismbr("Weeks6") or @ismbr("Weeks7") or @ismbr("Weeks8") or @ismbr("Weeks9") or @ismbr("Weeks10") or @ismbr("Weeks11") or @ismbr("Weeks12") or @ismbr("Weeks13") or @ismbr("Weeks14") )
    "Current_Forecast"/"Q1"->"Current_Forecast";......
    If anybody can help in suggesting how can i use user variable in this formula to achieve the required result.
    Thanks

    Hi
    Thanks for the suggestion and it would be a better idea to use ISIDESC as compared to ISMBR.
    I also wanted to ask if in the below mentioned formula if the result of first line is true than will the second line pick the current_forecast value of the respective member of Q1 and divide it by the current_forecast value of Q1.
    IF(@ISIDESC("Q1"))
    "Current_Forecast"/"Q1"->"Current_Forecast";
    Also i need to know how can i write a member formula for week YOY% using user variables.The general formula is
    Week 1 of FY13 - Week 1 of FY12/Weeks 1 of FY12
    Week 2 of FY13 - Week 2 of FY12/Weeks 2 of FY13 and so on till week 53.
    Thanks

  • Use of Checkboxes on reports

    Hi
    I am using the HTMLDB_ITEM.CHECKBOX function. It works fine in the report, as below;
    SELECT
    "POOL_CARS"."ID" "ID",
    "POOL_CARS"."REG_NUM" "REG_NUM",
    "POOL_CARS"."MAKE" "MAKE",
    "POOL_CARS"."BHP" "BHP",
    "POOL_CARS"."PURCHASE_DATE" "PURCHASE_DATE",
    "POOL_CARS"."MODEL" "MODEL",
    "POOL_CARS"."COLOUR" "COLOUR",
    "POOL_CARS"."STYLE" "STYLE",
    "POOL_CARS"."PRICE" "PRICE",
    "POOL_CARS"."AVAILABLE" "AVAILABLE",
    HTMLDB_ITEM.CHECKBOX(1,"AVAILABLE",
    DECODE(AVAILABLE,'Y','CHECKED',null)) "Av ",
    "POOL_CARS"."DEPT" "DEPT"
    FROM
    "#OWNER#"."POOL_CARS" "POOL_CARS"
    I want to use the checkbox to cause an update to the table (set Avail to Y where the box is checked, and to N for all other rows). So I have then created a submit button and a process to be run as follows
    FOR I in 1.. HTMLDB_APPLICATION.G_F01.COUNT LOOP
    UPDATE POOL_CARS
    SET available = 'Y'
    WHERE ID = to_number(HTMLDB_APPLICATION.G_F01(i));
    htp.p('debug' || HTMLDB_APPLICATION.G_F01(i));
    END LOOP;
    I have a few problems here.
    1. When the page is run the check boxes show up fine. When submit is pressed I get
    ORA-01722: invalid number.
    2. The line 'htp.p('debug' || HTMLDB_APPLICATION.G_F01(i));' does not seem to do anything !
    3. I do not understand how to connect the current line within the loop to an actual row as the where clause is not realistic.
    Can anyone help.? .

    Jelane,
    You have to reference the "ID" in your htmldb_item.chekbox api:
    htmldb_checkbox(1,"ID",.....
    Hope this helps,
    Jos

  • HT204266 I used several apple and iTunes gift cards on my account with relevant codes.  How can I verify all cards have been used when total purchases don't line up?

    I have used several apple app and itunes gift cards to purchase apps and music with no problem.  Codes were entered as required.  Is it possible to get a printout of the card amount and codes to check against purchases.  My total is not jiving.

    No, you can't see a list of card redemptions, nor how items were billed - all you can do is view your account's purchase history via your computer's iTunes : log into your account on your computer's iTunes via the Store > View Account menu option, you should then see a Purchase History section with a 'see all' link to the right of it. Click on that and you should then see a list of your purchases.

  • How to use the distinct key in formula field in SAP Crystal Reports

    I want to use the distinct key in formula field in SAP Crystal reports.
    When i'm using it shows an error.
    Please suggest me....

    Hi,
    Use DistinctCount keyword directly for your calculation instead of count(distinct(....
    Alternatively, if you want to avoid duplicate records, under "File" > "Report Options" make the 'Select Distinct Records' as True.
    Thanks,
    Raghavendra

  • Help please - An email address that I rarely used several years ago got reset to someone else's apple ID in place of the email account they used to create their account. How can this happen?

    A friend accused me of switching an email account that I used several years ago to send them photos on Flikr (gmail) for their Apple ID - in other words of.messing with their account. I only used the gmail account to post / send them and several other people photos on a few occasions and have not used the account since. I forgot that I had it. When this friend couldn't access their iTunes account the store discovered that the email had been reset to my very old gmail address. How is this possible? Now, they are accusing me of hacking in although no purchases were made and nothing was done with the account. Still, my reputation is at stake. Could they have done it in error? It looks bad for me. Help please.

    I made up the names edward and daniel, it's not actually anyone's email address, so no need for concern.
    In practice, I'm sure you're right that I would have fewer problems with a longer, more complex email address. But in principal, the problem remains. I could sign up for the Apple ID
    1234.NoOneWillEverUseThisAddress.5678@gmail
    and someone else could sign up for the Apple ID
    1234.NoOneWillEverUseThisAddress.5678+1@gmail
    and apple would have no problem with it, even though for all intents and purposes it's the same email address. So the problem is not just the ambiguity of my, to use Dahveed's words, overly simplistic and unsophisticated, email address:
    there is a fundamental flaw in the way Apple links email addresses to accounts that allows for this ambiguity.  If they followed the same conventions that gmail did, there would be no possibility of this problem.

  • Use a checkbox to hide/show (toggle) another field

    I have a form I am creating in Adobe Acrobat X.  The form will ultimately be used as a data entry interface on iPads.  I need to keep the form very simple but there is a lot of technical information the end users may need to help fill out the forms.  I would like to be able to have a button, checkbox or other object enable the user to display additional information.
    I have played with making links to attached documents, using the article tool and finally trying to use a checkbox to drive the hidden/visible property of a text field.  Admittedly, I am a horrific programmer so I need some spoon fed help. 
    My check box is called: GMR1_1_Details_Select
    The text field is called: GMR1_1_Details
    I have been trying this and that with JavaScript in both the Actions tab and Calculate tab and am unsuccessful.
    Can anyone solve this puzzle for me?  I want to code this into my form:
    // so when the check box named "GMR1_1_Details_Select" is checked, my text box field ("GMR1_1_Details") is visible.  If the user unchecks the box, it would be hidden.  By default, the text box should be hidden and the checkbox shouldbe unchecked.
    If GMR1_1_Details_Select = yes
    Then GMR1_1_Details = visible
    else
    GMR1_1_Details = hidden
    I have tried codes similar to:
    if (event.target.value!="On") This.getfield(“GMR1_1_Details”).display = display.hidden;
    and other code similar to:
    Var GMR1_1 = this.getField(“GMR1_1_Details”);
    If(GMR1_1==="yes");
    This.getfield(“text10”).display = display.hidden;
    else
    This.getfield(“text10”).display = display.visible;
    In both cases I am getting nothing.  I have realized that I have at least 2 problems:
    1) I don't know how to write the right code and,
    2) I don't know where to put it.
    Please and thank you

    Yes, here is a link to the documentation: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.135.html
    There are a number of examples that demonstrate various options. You can add a title, but to make the JavaScript warning go away the document would have to be certified and the user would have to trust it to execute JavaScript, or each user would have to install a JavaScript file in a particular location on their system. If this might be feasible for your situation, post again for more details.
    If you want to get really fancy, it's possible to create custom dialogs that include things like images as well as text, and you have more control over the layout. This is one of the more complicated things in Acrobat JavaScript though, so you have to really want it if you plan on learning more.

  • Can anyone help me figure out how to sync my ipod with my purchased music?  I have used several computer and at one point synced my ipod with a computer that only had about half of my music.  My other computers are no longer working.  Not sure how to get

    Can anyone help me figure out how to sync my ipod with my purchased music?  I have used several computer and at one point synced my ipod with a computer that only had about half of my music.  My other computers are no longer working.  Not sure how to get my purchased music back onto my ipod?

    Hi kimcinma!
    Your previous purchases are saved on iCloud even if you bought them on another computer. If you can't find them on your current computer, you might need to unhide them. Go to iTunes preferences, and click on Store Preferences. Then click the box for "show iTunes in the Cloud purchases". Then click on OK, and everything you've ever bought from iTunes on that Apple ID will show up in your library. You will need to download them from iCloud first before you can synch them to your iPod Classic. To do this, click on the little cloud with the arrow in it next to your song, and it will download to your computer. When you have the music that you want downloaded, plug in your iPod and synch away. Hope this helps!
    Sandygirl

  • Using several data connections in one SSIS data source?

    I am loading data from several SQL Server 2012 databases into a datamart. Currently, I am simply using sql sources and destinations for that. However, some of the queries require JOINs between the source databases. Therefore I currently refer to the databases
    within the command text of the sql source, e.g.
        SELECT t1.Field, t2.Field
        FROM [server1].[db1].[dbo].[table1] t1
        JOIN [server1].[db2].[dbo].[table1] t2 ON t1.Table1Id = t2.RemoteTable1Id;
    This is flawed, since all the sql commands have to be changed if the database or server names change. It would be far better to refer to connections which can be changed on package level and my question is how to get that done.
    One way I can think of to get that done is to use several sql source queries and join the data with SSIS join operations. For that all current data flows need to be reworked and I am unsure about the performance when joining large databases compared to the
    performance of a single t-sql query.
    The other approach would be some dynamic sql stuff which I want to avoid whenever possible. However, if it was possible to use a parameter to insert server/database into the sql command somehow, then that could be an option.

    Whatever you're doing now is a bad practice inside SSIS. You should be using data flow tasks for this if data come from different sources and use connection managers pointing to each of them. You add these connection properties as config items which will
    enable you to change them from outside package based on your environment
    If performance is your concern you can go for staging approach where you bring deltas(changes) alone on daily basis and then use it in the comparisons with destination tables using MERGE or T-SQL for set based processing. You need to have audit columns in
    your tables for this though.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Using a checkbox to display a value in another cell

    I want to use a checkbox in cell A1 to display in cell B1 either 0 or a value that's in cell C1. I've tried the IF function, but I keep getting a syntax error. Any ideas?

    How could you do the same thing but using only two cells?
    where the check box returns a specific value in the second.
    in this instance its for a staff registration sheet where a checkbox in (A) would return a set value in (B)
    i know this might sound simple to you guys in the know but i cant figure it out! I have been messing around trying things with the if function but still only shows me the red triangle (syntax error).
    A simple solution would be much appreciated.

  • Change Value of HTMLDB_ITEM using HTMLDB_ITEM.CHECKbox

    Hello,
    I've got a region with a 'pl/sql function returning sql query'
    declare
    q varchar2(4000);
    begin
    q:=' select htmldb_item.checkbox(1,t.jedi_ean_id) as Auswahl, ';
    q:=q||' t.ean, j.artikelbezeichnung, ';
    q:=q||' t.artikelmengeneinheit, ';
    q:=q||' htmldb_item.text(2,t.iln) as ILN, ';
    q:=q||' from malus.jedi_ean t; ';
    return q;
    end;
    My Query return for example 10 rows. Now I want to check 5 of this 10 rows using the checkbox.
    With the following PROCESS i am able to save the new values of the field ILN to the Database.
    for i in 1..HTMLDB_APPLICATION.G_F01.COUNT
    loop
    update jedi_ean j
    set j.iln = HTMLDB_APPLICATION.G_F02(i),
    where j.jedi_ean_id = HTMLDB_APPLICATION.G_F01(i);
    end loop;
    Now to my Problem:
    I want to have an input field outside of this report where the user can manually set the value of the field ILN.
    Afterwards the user checks 5 of the 10 rows and then he should have the possibility to click on a button
    to assign these values to the 5 checked rows in the report, not in the database.
    After this step the user should click on a submit button an start the existing process above.
    Is this possible??

    Hi,
    I do not know can you do that with dynamic action or is there of of box solution.
    But see this example
    https://apex.oracle.com/pls/apex/f?p=40323:30
    You can bind onchange event to text field, and call Ajax to get emp name.
    Then use sample JavaScript to set value to display only item
    Regards,
    Jari

  • Problem using a checkbox in a DB update. Please help

    Hello;
    I am writting a little application as a type of control. I am
    using a checkbox as lets say an on off switch. All my pages work
    nice up to the point of turning the check off, or taking it away so
    the BD table field is blank. I get an error when I uncheck the box
    and hit update. Can anyone help me? I will attach my code, here is
    the error I get:
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in
    UPDATE statement.
    The error occurred in
    C:\websites\108392zj7\sound\sound_RecordAction.cfm: line 9
    7 : <cfif ParameterExists(Form.btnEdit_OK)>
    8 : <cfif ParameterExists(Form.RecordID)>
    9 : <cfupdate datasource="#sitedatasource#"
    username="#siteUserID#" password="#sitePassword#" tableName="sound"
    formFields="#Form.FieldList#">
    10 : <cflocation url="sound_RecordView.cfm">
    11 : </cfif></cfif>
    SQL update sound set on= (param 1) where ID= (param 2)
    DATASOURCE csee
    VENDORERRORCODE -3503
    SQLSTATE 42000
    attached is the code for the 3 pages I am using to run this
    little app for now. (Will be condensing it down to 1 or 2 pages
    soon.
    Please help, I have been looking at this code for 2 days now
    and can't get it to function properly.
    Phoenix

    I did change the code on the edit page with a soundOn field.
    here is the code:
    <html><head>
    <title>sound - Edit Record</title>
    </head><body bgcolor="#FFFFFF">
    <font size="+1">sound</font> <br>
    <font size="+2"><b>Edit
    Record</b></font>
    <cfoutput>
    <form action="sound_RecordAction.cfm" method="post">
    <input type="hidden" name="FieldList"
    value="#FormFieldList#">
    <cfif isDefined("URL.RecordID")>
    <input type="hidden" name="RecordID"
    value="#URL.RecordID#">
    <input type="hidden" name="ID" value="#URL.RecordID#">
    </cfif>
    <table>
    <tr>
    <td valign="top"> on: </td>
    <td>
    <input type="checkbox" name="soundOn"
    value="#soundOn_Value#">
    </td>
    </tr>
    </table>
    <input type="submit" name="btnEdit_OK" value=" OK ">
    <input type="submit" name="btnEdit_Cancel"
    value="Cancel">
    </form>
    </cfoutput>
    </body>
    </html>
    It still isn't changing the db record though. here is the
    rest of the code:
    INDEX PAGE:
    <cfquery name="soundRecord" dataSource="csee"
    maxRows=1>
    SELECT sound.soundOn AS ViewField1, sound.ID AS ID_Field
    FROM sound
    <cfif isDefined ("URL.RecordID")>
    WHERE sound.ID = #URL.RecordID#
    </cfif>
    </cfquery>
    <html>
    <head>
    <title>sound - View Record</title>
    </head>
    <body bgcolor="#FFFFFF">
    <cfoutput query="soundRecord">
    <table>
    <tr>
    <td width="66" align="left" valign="top"> <font
    size="2" face="Verdana, Arial, Helvetica, sans-serif">Sound
    is:</font></td>
    <td width="114" align="left" valign="top"><font
    size="2" face="Verdana, Arial, Helvetica, sans-serif"><cfif
    ViewField1 eq
    0>off<cfelse>on</cfif></font></td>
    </tr>
    <tr>
    <td colspan="2" align="left" valign="top"><form
    action="sound_RecordAction.cfm" method="post">
    <input type="hidden" name="RecordID"
    value="#ID_Field#">
    <input type="submit" name="btnView_Edit" value=" Turn
    sound off ">
    </form></td>
    </tr>
    </table>
    </cfoutput>
    </body>
    </html>
    And action page:
    <cfif isDefined("Form.btnEdit_OK")>
    <cfif isDefined("Form.RecordID")>
    <cfparam name="form.soundOn" default="0">
    <cfquery datasource="#sitedatasource#"
    username="#siteUserID#" password="#sitePassword#">
    UPDATE sound
    SET soundOn = <cfqueryparam value="#form.soundOn#"
    cfsqltype="cf_sql_bit">
    WHERE ID = <cfqueryparam value="#form.RecordID#"
    cfsqltype="cf_sql_integer">
    </cfquery>
    <cflocation
    url="sound_RecordView.cfm?RecordID=#Form.RecordID#">
    </cfif></cfif>
    The first code is page 2, the edit page. Don't know why it
    isn't changing the DB record.
    Phoenix

  • Use of sums in other formulas

    Post Author: skootsu
    CA Forum: Formula
    Hello all.  I'm dealing with a huge report request that is to be output to excel.  It pulls from a inventory transaction table with tons of records.  I have  grouped by transaction type then summed and counted.  I need to take these sums and counts of each transaction type (3 types) then use these figures in other formulas.  My finished report will have 29 columns, 16 are formulas, 10 are based off these first 6 (sums&counts), the rest of the fields are flat data off the part records(like part #, description, last cost, productcode).  I'm thinking I can get all the data into one report (I was able to create a crosstab with the totals), however it will be huge and I only want to pull over the minimum needed data into the excel sheet.  Being new to Crystal Reports, I was wondering if a subreport is what might be what I need here or if I just some how can get the totals, like they appear in the crosstab, to come over so they can be used in new (summary) report?  I saw something about shared variable as well but my knowledge is limited to what I have picked up hands on.
    Any tips or hints are greatly appreciated.  This is the largest report I have had to create.  My past experience is with db2, query400 and what I would normally use to accomplish this task, rpg.  I have CR9& Oracle.

    Post Author: GraemeG
    CA Forum: Formula
    My past experience is with db2, query400 and what I would normally use to accomplish this task, rpg
    Ahhh, a man after my own heart!
    Just a quick warning, if you're pulling tons of data, doing loads of joins, making lots of clever calculations and summarising in all manner of ways, you may find that your report runs like a pig! The SQL Crystal generates is very clunky for starters and adding all the other bits will make developing, testing and running it quite tedious - particularly if you're new the the 'Crystal Way'. If I were you, I'd use a SQL client to figure out a cunning SQL statement that extracts and formats the data and does as many of the calculations and summaries as possible. Once you have this, use the 'Add command' bit in database expert to insert your own clean, quick and non-psychotic SQL code. This will give you something that looks like a file but contains your formatted data.
    I may be shouted down for suggesting this but by doing this, I reduced the run-time for a huge extract/calculate/export-to-excel report from 12 minutes down to 18 seconds and made a bunch of the other reports acceptable in the users eyes by reducing the run-speeds dramatically.
    Fair enough, the SQL statements are not simple but they run quickly and accurately and thats what counts. If you do decide to give this a try and need a hand, let me know.
    BTW, why wouldn't you use RPG to do this?

Maybe you are looking for

  • Why can't I use my iTunes card balance to given an app?

    Hi, I have a balance from an iTunes card. I just sent an app as a gift, but iTunes forced me to use my credit card. Why can't I use my balance? Thanx Olivier

  • No row found for rowKey.

    Hi I am using Oracle Jdeveloper 11g Release 1 I have a database table: SQL> desc em_cs_cc_history; Name                                      Null?    Type NAME                                      NOT NULL VARCHAR2(64) VERSION                        

  • Suddenly can't connect to public wifi

    I've been away from home for several weeks and have been using the hotel public wifi with no problems. A few days ago my ipod crashed and since rebooting and restarting I cannot connect to the hotel's public wifi. It connects briefly and then disconn

  • I would like to use Formcentral form data to populate a pdf with the same fields.  Is that possible?

    I would like to use Formcentral form data to populate a pdf with the same fields.  Is that possible?

  • Flash in not working

    hi, i tried to downlaod Flash Plaer and i got the message that it is already installed!! but the software does not appear in the list of programs in the Add/Remove. i'm using Windows Vista Home Premium. Thank you, shuki