Grouping a range of numbers into a like group

I am trying to group credit scores by risk value.  The data that I'm pulling in is a number an I want to convert it to a letter. 
So anything over a score of 700 is A credit for example.  Anything between 660 and 699 is B Credit, between 630 and 659 would be C Credit and so on.
Currently the data comes in from the databas as a string field(dont make sense to me either), the string field is a number anywhere from 0 to 800.  I do understand that I will have to convert the string to a number and then probably a SELECT CASE statement, but I'm lost from there.  My current select case looks like this
select CDbl({APPLIC_DATA.AP_RISK_SCORE})
    Case Is >= 700:
    "A"
    Case 660 To 699:
    "B"
    Case 630 To 659:
    "C"
    Case 580 To 629:
    "D"
    Case 1 To 579:
    "E"
    Case 0:
    "No Score"
This is not working for me.  I was thinking that it would change my numbers in this field to the correct letter that corresponds to that number and I could group from there, but that obviously is not what is happening.
Any help would be appreciated.

I'm sorry I have one more issue that I discovered here and cant seem to fix.  Some of the fields are blank and have no data so I have tried...
if tonumber({APPLIC_DATA.AP_RISK_SCORE})>=700 then
"A"
else if tonumber({APPLIC_DATA.AP_RISK_SCORE}) in 660 to 699 then
"B"
else if tonumber({APPLIC_DATA.AP_RISK_SCORE}) in 630 to 659 then
"C"
else if tonumber({APPLIC_DATA.AP_RISK_SCORE}) in 580 to 629 then
"D"
else if tonumber({APPLIC_DATA.AP_RISK_SCORE}) in 1 to 579 then
"E"
else if tonumber({APPLIC_DATA.AP_RISK_SCORE})=0 then
"No Score"
else "No Score"
Along with other such as:
else if tonumber({APPLIC_DATA.AP_RISK_SCORE})="" then
"No Score"
All with no outcome.  The field just remains blank.  What am I doing wrong here?

Similar Messages

  • Formula for putting in phone numbers into numbers like (444)333-3333

    Need formula for putting in phone numbers into numbers like (444)333-3333

    Drag and Drop Groups Application from the App store. It ROCKS! It even syncs your groups from the application to the regular contacts application on your phone. Best app I ever bought.

  • Averaging a range of numbers

    I'm looking to try and average a range of numbers, but instead of doing it by certain rows (that is, average rows A1 through A30), I'd like for Numbers to average cells if they fall into a certain numerical range (that is, average cells whose values are 1-30, but whose rows might be A1 through A70 or A1 through A42--you don't know). Since my cells are numerically ordered, I could go through and find myself the cells that fall into the range (is it A70 or A42?), but I have a few thousand rows so that's really not economical in terms of time. Could someone help me to figure out the function to average cells based on their numerical value?
    Thanks!

    Here's how you might set up the formula:
    The formula in B3:
           =AVERAGEIFS(Table 1::A,Table 1::A,">"&B1,Table 1::A,"<"&B2)
    It's a little tricky because you need the " " in the proper places.  You could hardcode the values into the formula itself with something like ">0" and "<31" but it's generally good practice to put the conditions in cells so you can vary them as needed.
    SG

  • IF Else (javascript) with a range of numbers

    I am creating form fields in a PDF using Acrobat.  There is a field which you enter an amount (1-20, 21-100, 100+) and depending on what is entered the cost will be different.  So if 1 thru 20 units are entered the cost will be $199 per unit, 21 thru 100 units the cost is $175 per unit and 100+ units the cost is $150 per unit.  The line on the document looks like:  Number of Entities___ X Price per Entity___= Total___. 
    This is what I have so far to get the price;
    if (this.getField("No. of Entities").value == '1') {
    event.value = 199
    } else if (this.getField("No. of Entities").value == '21') {
    event.value = 175
    } else if (this.getField("No. of Entities").value == '101') {
    event.value = 150
    } else {
    event.value = 0 // Default value here
    I have it working for a single number, I just can't get a range of numbers.
    Any help would be great, thanks.

    The problem is in the logic of your condition.  This will only hit when you have the value of 1, 21, or 101.
    I'd suggest a different set of logic, based on <= operators
    if (this.getField("No. of Entities").value <= '20') {
    event.value = 199
    } else if (this.getField("No. of Entities").value <= '100') {
    event.value = 175
    } else if (this.getField("No. of Entities").value >= '101') {
    event.value = 150
    } else {
    event.value = 0 // Default value here
    or something along those lines.  I would also imagine that having the operators be numeric (no quotes on the constant) would be more effective.
    But this is general JS advice and not tried within a form.
    Also, I have a question for you.  Are you designing this as an PDF form inside Acrobat, or are you using LiveCycle Designer?  That information will help when we move this issue into the proper forum.

  • How do you create the equivalent of a named  range in Numbers for iPad?

    At first I didn't think Numbers could handle named ranges but when I look at the formula written for the "Personal Budget Template"  The "Actuals" column is calculating using named ranges but I am not sure how the ranges were created...  In any case it does appear that there is a way.  Does anyone know how?

    Those technically are not named ranges. Its using the information in the "header" rows. Once you make a row a header row and sum it (or include the whole colun in some function). It will use the data/name in the header row in the equation to make it clearer. I do not think you can make named ranges in Numbers.
    I made a test excel workbook using two formulas to sum a range, one with named ranges one without and sent to my ipad, when i opened it up...and downloading... yep...  it converted the named range to a regular range with letters and numbers. no named ranges support.
    But learn to use your header and footer rows to get the same affect in many functions.
    When i assign both header rows and columns to a table, it combines them into one string to show "Jan 2001" when I had a header column with Jan in A2, and a header row with "2001" in B1, then used the value in an equation.
    The one your looking at I think says something like "=Sum(actuals)". that formula is in a designated footer row, and has a designated header row. at the top of that column is the label "actual". if you look at the difference column formulas, you will see how it combined header rows and columns into a single text string and use it to cross reference the cell being used.
    Jason

  • Using the IF function with a range of numbers

    I am working with the IF function and trying to get it to work "if" the number I'm examining is within a range of numbers.
    Example:
    If a wigit costs between $1000 and $1999, then a discount of $100 is given
    If a wigit costs between $2000 and $2999, then a discount of $150 is given
    If a wigit costs between $3000 and $3999, then a discount of $225 is given
    And so on.
    If cell A1 always holds the current cost of the wigit being sold.
    cell B1,B2,B3 holds the value of the discount values respectively.
    In cell C1 I would like to return what the current discount value is to be given for the wigit price in cell A1?
    How do I do this using the IF function or is there another way?
    Thanks,
    Ryan

    HI Ryan,
    In this post you have, except for the issue noted by Badunit, the basis for the discount table described by Wayne:
    I'm trying to devise a way of knowing what Cash Card a customer will receive depending on the amount of the purchase, based on the following table:
    $0         to $999 purchase         =      $50 Cash Card
    $1,000 to $1,999 purchase     =     $100 Cash Card
    $2,000 to $2,999 purchase      =     $200 Cash Card
    $3,000 to $3,999 purchase      =      $300 Cash Card
    $4,000 to $4,999 purchase      =      $400 Cash Card
    $5,000 to $5,999 purchase      =     $550 Cash Card
    $6,000 to $6,999 purchase     =      $700 Cash Card
    $7,000 to $7,999 purchase      =     $850 Cash Card
    $8,000 to $8,999 purchase     =      $1,000 Cash Card
    $9,000 to $9,999 purchase     =     $1,200 Cash Card
    $10,000 to   UP   purchase     =     $1,500 Cash Card 
    To take care of the issue noted by Badunit, you need to revise the top line to state the minimum purchase necessary to earn a cash card, then add a line above that to handle purchases under that amount. I've arbitrarily chosen a $500 minimum, which results in these two lines:
    $0             to $499 purchase        =      $0 Cash Card
    $500         to $999 purchase         =      $50 Cash Card
    To write this as Wayne's table, you need to remove all of the text (including the $ currency markers), the top end of each range, and the = sign. What you're left with is two columns of numbers: The bottom number of each range of values, and the number telling the dollar amount of the cash card for that range. Here's your table, edited to make it work with LOOKUP:
    Here is a second table (Main), containing only the labels and the two cells involved in the calculation of the cash card amount. The Purchase amount is the amount used in your example. The Cash Card amount is produced by the LOOKUP formula below the image.
    Purchase price is in cell B1 of the table "Main". The LOOKUP formula is in B2:
    B2: =LOOKUP(B1,CC Amt :: A,CC Amt :: B)
    LOOKUP acts essentially as you request in your post containing the iPad image with the time shown as 1:46. But it takes a much simpler approach.
    Here's the syntax:
    LOOKUP(search-for,search-where,return-from)
    LOOKUP gets the search-for value (2535) from cell B1.
    It looks in column A of the table "CC Amt" for the largest value less than or equal to the search-for value, and finds 2000.
    It returns the value from the same line of column B (200).
    Below are two more examples. Main-2 and Main-3 are copies of the Main table. Both contain exactly the same formula as Main, but have had a different Purchase price amount entered. LOOKUP uses the same CC Amt table as is used above, and returns the appropriate Cash Card value for each of the two new amounts:
    You may, as implied in your 1:46 post, use a pair of cells to calculate the Cash Card amount for each widget in the purchase, then total the Cash Card amounts, or you may use a single pair of cells, one containing the total purchase amount, the other containing the Cash Card amount due for that total. That choice is yours. The formula is the same for either case.
    Regards,
    Barry

  • HOW TO DESIGN RANGE SELECTION IN MODULE PULL LIKE SELECT-OPTION.

    HOW TO DESIGN RANGE SELECTION IN MODULE PULL LIKE SELECT-OPTION.
    how can we add range selection in screen painter.
    regards.

    Hi,
       create two input fields and a push button like select option in the screeen.
    Try checking this logic
    <b>Program:</b>
    <b>ranges</b> ra_matnr for mara-matnr.
    <b>Layout field name declaration:</b>
    Give the low field name as ra_range-low
      and high field name as ra_range-high.
    extension for pushbutton.--exten(function code)
    next -- function code for the enter key.
    PBO
    module status_3000.
    PAI
    module user_command_3000.
    <b>module user_command_3000.</b>
    if sy-ucomm = exten.
      call screen 400. (screen which shows extension values can be kept).
    elseif sy-ucomm = Next.
    if ra_matnr-low is not initial.
        ra_matnr-SIGN = 'I'.
        ra_matnr-OPTION = 'EQ'.
        APPEND ra_matnr.
        clear ra_matnr.
    endif.
    if ra_matnr-high is not initial.
        ra_matnr-SIGN = 'I'.
        ra_matnr-OPTION = 'EQ'.
        APPEND ra_matnr.
        clear ra_matnr.
    endif.
    endif.
    endmodule.
    module status_3000.
    read table ra_matnr  index 1 into ra_matnr .
    set pf-status '3000'.
    set title '3000'.
    endmodule
    Br,
    Laxmi.

  • Find a range of numbers in one cell and output in another

    Here I am again with something I just can't seem to find an answer to:
    I need to find the range of numbers in one cell and place that value in another, like so:
    Cell A1 says: "3 - 8"
    Cell A2 returns: 5
    Any simple formula to do this?

    Hi gunkie83,
    Yvan's formula does perform properly. He stated: Here the decimal separator is comma so Numbers use the semi-colon as parameters separator but the formula is OK. CAUTION, here I left the semi-colons.
    Yvan is in France using the French version of iWork. For the U.S.A. semicolons need to be changed to a comas as I have in the following formulae.
    =VALUE(LEFT(A,SEARCH("-",A)-1))-VALUE(RIGHT(A,LEN(A)-SEARCH("-",A)))
    this returns -5
    =ABS(VALUE(LEFT(A,SEARCH("-",A)-1))-VALUE(RIGHT(A,LEN(A)-SEARCH("-",A))))
    this returns 5
    One important observation in cell A2 the text reads as 3 - 8 not 3-8. Also it can be inputted as 3 -8 but not 3- 8. Watch those spaces. Fun huh.
    Hope this helps. Again Yvan thank you.
    Cordially,
    RicD

  • Printing a range of numbers

    Dear All,
    I have to print a range of numbers that I give in selection screen, say 1 to 20 in two columns (on a sticker).
    Kindly give me the logic, how to go about it.
    Regards,
    Alok.

    Hi Alok
        you can do like this
    TABLES : caufvd.
    SELECT-OPTIONS  :  s_auart FOR caufvd-auart. 
    write : "from",s_auart-low , "to", s_auart-high.
    Regards
    Wiboon

  • Numbers into textfield using boolean buttons and case structure?

    Hi!
    I'm very new to these forums, and to LabVIEW in general. I'm currently trying to implement a calculator-ish, but without the operations (+ - * /).
    I have 10 boolean buttons, named 0-9, and with these I want to basically write a sequence of numbers into a textfield. I've managed to solve the problem using an Event structure, but now i'd like to achieve the same result using a Case structure instead. The problem is that I can't identify which button has been pressed, so I can't make the program go to the correct case (0 to 9). Is there any simple solution to this that you guys could help me with? Maybe a property node that's generic for every button? I dont know
    Anyways, I'm attaching a simplified version of what I'm trying to achieve, withouh the code I don't know how to write obviously.
    Thanks for your help in advance!
    /Sebastian
    Solved!
    Go to Solution.
    Attachments:
    help.vi ‏12 KB

    Here is a way to do it: bundle the boolean values into an array, turn that into an 8 bit number and wire that to a case structure with a boolean radix
    Message Edited by jmcbee on 03-31-2009 02:29 PM
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
    Attachments:
    helpMOD.PNG ‏13 KB
    helpMOD 80.vi ‏20 KB

  • Entering numbers into textfield

    Hi,
    is there any way of entering numbers into a textfield whereby the user doesn't have to toggel the device inorder to produce said numbers- a bit like a calculator application; any suggestions welcome
    James

    Sure, it is very easy.
    Read about TextField Input Constraints.
    They are
    ANY
    EMAILADDR
    NUMERIC
    PHONENUMBER
    URL
    DECIMALYou need NUMERIC or DECIMAL.
    You can set them in two way
    1. public void setConstraints(int constraints)2. Pass to TextField constructor:
    TextField(String label, String text, int maxSize, int constraints)e.g.
    TextField myTextField = new TextField("myLabel", "myText", 32, TextField.NUMERIC)Read also about Input Modes. It can be also useful.

  • Converting a string of numbers into an array of booleans

    For a homework assignment, I need to convert a string of numbers into an array of booleans.  The string is a bunch of random numbers (0-9) in sequence, with no spaces.  It looks something like this: 0123452348949230740329817438120947392147809231419.  I need to make it so that each even number represents a "True" boolean and so that each odd number represents a "False" boolean.  I think that I first need to convert each element of the string into a number, and then use a case structure (or something) to say, for each element of the array, "If even, then true.  If odd, then false," but I could be wrong.  Any suggestions?

    billko wrote:
    Hooovahh wrote:
    billko wrote:
    Sounds reasonable.  Think about the definition of "odd" and "even" and it will make life a lot easier. 
    I know you are trying to be vague but I'd like to give a key hint.  Use the Quotient and Remainder function.
    LOL maybe that was one of the objectives of the homework. 
    To be fair it sounds like there is more work that is needed.  A new user of LabVIEW will have a hard time figuring out how to process each character one at a time when it isn't in an array.  
    It's just that most people (me at least) stopped thinking about division with quotient and remainder after basic algebra.  I then of course changed my way of thinking when I used LabVIEW.  Still most of the time when you use division you want to know the fractional part as a decimal.  Thinking this way makes the problem more difficult then it needs to be.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • HT201210 tried to update to ios 6.1 and it crashed my phone, plugged it into itunes like it told me to and it said i needed to restore it, so tried and it failed and it just keeps failing. its an iphone 4. what do i do?!

    HELP.
    tried to update to ios 6.1 and it crashed my phone, plugged it into itunes like it told me to and it said i needed to restore it, so tried and it failed and it just keeps failing. its an iphone 4. what do i do?!

    it just says restore failed error 3194 but i can't find anything useful on google or anything i can understand, i don't get technology at all.

  • How do i put a mobile number in on numbers '09? like 0414441472. Doesn't like 0 at the front. Thanks

    How do i put a mobile number in on numbers '09? like 0414441472. Doesn't like 0 at the front. Thanks

    Ed,
    There are a number of ways to do this. Your phone number consists of all numerals, yet isn't a numeric value, but rather a text value. Numbers doesn't know that, so it treats it as a numeric value and strips off what it feels is an unnecessary leading zero.
    You have there options:
    Format the cells as Text prior to making the entry.
    Leave the cells as a Numeric value format, but choose Custom Format to set the number of displayed places and choose to display leading zeros.
    Use the Numeral System Format and set it to base 10, displaying 9 digits, or whatever you need.
    There are ways to convert a number to text and add required leading zeros with a formula too, but it's needless work.
    Jerry

  • How do I select a range of numbers using IF function

    I am trying to select a name in a cell if the value of another cell is either a 5,6,7,8 or 9.  I have had success when I have just wanted numbers above 9 or below 5 by using formulas
    IF(Table 1::C3<5,T(Table 1::A3),T(Table 1::A2))
    And
    IF(Table 1::C3>9,T(Table 1::A3),T(Table 1::A2))
    But for the life of me can't get the range of numbers in between.
    I have tried including AND and OR functions in multiple ways but to no success.  I know I am overlooking some simple thing, I have tried scratching for nested if functions but no help there either, and the information file in numbers is horrendously useless.
    Please help.  I am using an ipad btw.

    This forum is generally for iPad and iOS problems. I doubt that you'll get an answer here.
    Furthermore, you don't say what app you are using. If Numbers, you should post here https://discussions.apple.com/community/app_store/iwork_for_ios
     Cheers, Tom

Maybe you are looking for

  • Blank images in Crystal reports

    I'm trying to put image files from a sql server DB (gif format) in a report but they are blank in the report. Any ideas?

  • Can CS3 Pro save as Flash 8 format?

    This answer will help us while we transition many Flash 8 Pro licenses to Flash CS3 Pro! Can Flash CS3 Professional save its .FLA in a format that can be opened by Flash 8 Pro? ...Just as Flash 8 Pro can save as its .FLA in a file format that can be

  • Somebody can adopt and update FreeSwitch?

    Hi to everyone: FreeSWITCH is a scalable open source cross-platform telephony platform designed to route and interconnect popular communication protocols using audio, video, text or any other form of media.  It was created in 2006 to fill the void le

  • Crash on start up

    Hi BIg problem getting AE CS4 to work on my Mac book pro. When I start the program it crashes just when it is supposed to open. Tried updating - same result, now it just freezes and shots down after a couple of minutes. Contacted Adobe and got a trou

  • Small black bars on the top and bottom on video after exporting?

    I'm using 1280x720 video footage in Adobe Premiere. The problem is, whenever I export my finished project as 1280x720, the newly rendered file has small black bars on the top and bottom. These black bars are not there in the Premiere preview, only af