IF Function using a range of cells

Hello All,
I am trying to make my own budget, which I was able to make in excell on my PC.  I just got my Mac so I'm trying to figure out how to do the same thing on here.  I want to essentially have the formula look in one column for a key word (IE groceries, clothes, etc) and return the corresponding value and sum them all up.  In my PC it looked like this:  {=SUM(IF(C4:C11="Groceries",E4:E11,0),IF(H4:H11="Groceries",J4:J11,0))  When I do this on my Mac it says that there is an error because "C4:C11 can't be used as one number within this function".  I tried using lookup but it wont add them all together.
Thanks for the help!

You appear to have two sets of values to sum—those in column E, flagged with a category in column C, and a second set in column J, flagged in column H.
You'll need a SUMIF statement for each of these sets, then a means of adding (or summing) the two results. The resulting formula will be similar in some ways to what you've listed.
Information on the SUMIF function and its syntax is available in the Function Browser, as Wayne mentioned. If you'll be writing additional formulas in future, though, I'd also suggest downloading the two handy references provided by Apple, the Numbers '09 User Guide and the iWork Formulas and Functions User Guide. You'll find links for both in the Help menu in Numbers.
Here's the formula I used for the tables above. It incorporates a couple of features specific to Numbers, which you can read about in the two guides mentioned.
Summary::B2 (and filled down the rest of column B):
=SUM(SUMIF(Data :: C,A2,Data :: E),SUMIF(Data :: H,A2,Data :: J))
Regards,
Barry

Similar Messages

  • Creating a pop-down using a range of cells (Like Excel LIST feature)

    Can this be done in numbers. Instead of typing the data into a pop-up list to be pasted in an ongoing long spreadsheet, I was wondering if Numbers supports a similiar feature to Excel's MANAGE LISTS which allows the drop down to be locked to a range of cells instead. I know they are very similar, but wondering?
    -Kevin

    Kevin,
    Presently Drop-Down menu's can't be created from cell ranges in Numbers. It sounds like a good feature, and has been asked about many times here. You can Send Feedback to the Numbers team and tell them what you would like to see in the next version of Numbers. The Feedback link is under the Numbers menu item.
    Jerry

  • 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 use Pivot function for group range in oracle SQL

    Hi,
    Good Morning !!!
    I need to show the data in the below format. There is 2 columns 1 is State and another one is rate.
    State     <100     100-199     200-299     300-399     400-499     500-599     600-699     700-799     800-899     900-999     >=1000     Total
    AK     1     2     0     4     1     4     4     35     35     4     1     25
    AL     0     0     2     27     10     17     35     2     2     35     0     103
    AR     0     0     1     0     0     2     2     13     13     2     0     6
    AZ     0     1     2     14     2     14     13     3     3     13     0     57
    CA     0     0     1     6     2     7     3     4     4     3     0     34
    Developed the below query but unable to use the range on pivot function . Please help on this.
    (select      (SELECT SHORT_DESCRIPTION
         FROM CODE_VALUES
         WHERE CODE_TYPE_CODE = ad.STATE_TYPE_IND_CODE
         AND VALUE = ad.STATE_CODE
         ) STATE,
    nr.rate
         FROM neutrals n,
         contacts c,
         addresses ad,
         xref_contacts_addresses xca,
         neutral_rates nr
                        where n.contact_id=c.contact_id
                        and n.address_id = ad.address_id
                        and xca.address_id=ad.address_id
                        and xca.contact_id=c.contact_id
                        and nr.contact_id = n.contact_id
                        and nr.rate_frequency='HOUR' )

    user8564931 wrote:
    This solutions is useful and Thanks for your reply.
    How can i get the Min value and Max value for each row ?
    State     <100     100-199     200-299     300-399     400-499     500-599     600-699     700-799     800-899     900-999     >=1000     Total     Min     Max
    IL     0     0     1     5     1     5     40     1     1     40     0     53     $10     $2,500
    IN     0     0     0     0     0     0     1     49     49     1     0     3     $70     $1,500This?
    WITH t AS
            (SELECT 'AL' state, 12 VALUE FROM DUAL
             UNION ALL
             SELECT 'AL' state, 67 VALUE FROM DUAL
             UNION ALL
             SELECT 'AL' state, 23 VALUE FROM DUAL
             UNION ALL
             SELECT 'AL' state, 12 VALUE FROM DUAL
             UNION ALL
             SELECT 'AL' state, 12 VALUE FROM DUAL
             UNION ALL
             SELECT 'AL' state, 78 VALUE FROM DUAL
             UNION ALL
             SELECT 'AL' state, 34 VALUE FROM DUAL
             UNION ALL
             SELECT 'AL' state, 4 VALUE FROM DUAL
             UNION ALL
             SELECT 'AL' state, 12 VALUE FROM DUAL
             UNION ALL
             SELECT 'AL' state, 15 VALUE FROM DUAL
             UNION ALL
             SELECT 'AZ' state, 6 VALUE FROM DUAL
             UNION ALL
             SELECT 'AZ' state, 123 VALUE FROM DUAL
             UNION ALL
             SELECT 'AZ' state, 123 VALUE FROM DUAL
             UNION ALL
             SELECT 'MA' state, 23 VALUE FROM DUAL
             UNION ALL
             SELECT 'MA' state, 120 VALUE FROM DUAL
             UNION ALL
             SELECT 'MA' state, 456 VALUE FROM DUAL
             UNION ALL
             SELECT 'MA' state, 11 VALUE FROM DUAL
             UNION ALL
             SELECT 'MA' state, 24 VALUE FROM DUAL
             UNION ALL
             SELECT 'MA' state, 34 VALUE FROM DUAL
             UNION ALL
             SELECT 'MA' state, 87 VALUE FROM DUAL
             UNION ALL
             SELECT 'MA' state, 23 VALUE FROM DUAL
             UNION ALL
             SELECT 'MA' state, 234 VALUE FROM DUAL
             UNION ALL
             SELECT 'MA' state, 789 VALUE FROM DUAL
             UNION ALL
             SELECT 'MH' state, 54321 VALUE FROM DUAL),
         -- End of test data
         t1 AS
            (  SELECT state,
                      NVL (COUNT (DECODE (VALUE, 0, 0)), 0) "<100",
                      NVL (COUNT (DECODE (VALUE, 1, 1)), 0) "100-199",
                      NVL (COUNT (DECODE (VALUE, 2, 2)), 0) "200-299",
                      NVL (COUNT (DECODE (VALUE, 3, 3)), 0) "300-399",
                      NVL (COUNT (DECODE (VALUE, 4, 4)), 0) "400-499",
                      NVL (COUNT (DECODE (VALUE, 5, 5)), 0) "500-599",
                      NVL (COUNT (DECODE (VALUE, 6, 6)), 0) "600-699",
                      NVL (COUNT (DECODE (VALUE, 7, 7)), 0) "700-799",
                      NVL (COUNT (DECODE (VALUE, 8, 8)), 0) "800-899",
                      NVL (COUNT (DECODE (VALUE, 9, 9)), 0) "900-999",
                      NVL (COUNT (DECODE (VALUE, 10, 10)), 0) ">=1000"
                 FROM (SELECT state,
                              CASE
                                 WHEN VALUE < 100 THEN 0
                                 WHEN VALUE BETWEEN 100 AND 199 THEN 1
                                 WHEN VALUE BETWEEN 200 AND 299 THEN 2
                                 WHEN VALUE BETWEEN 300 AND 399 THEN 3
                                 WHEN VALUE BETWEEN 400 AND 499 THEN 4
                                 WHEN VALUE BETWEEN 500 AND 599 THEN 5
                                 WHEN VALUE BETWEEN 600 AND 699 THEN 6
                                 WHEN VALUE BETWEEN 700 AND 799 THEN 7
                                 WHEN VALUE BETWEEN 800 AND 899 THEN 8
                                 WHEN VALUE BETWEEN 900 AND 999 THEN 9
                                 WHEN VALUE >= 1000 THEN 10
                              END
                                 VALUE
                         FROM t)
             GROUP BY state)
    SELECT STATE,
           "<100",
           "100-199",
           "200-299",
           "300-399",
           "400-499",
           "500-599",
           "600-699",
           "700-799",
           "800-899",
           "900-999",
           ">=1000",
             "<100"
           + "100-199"
           + "200-299"
           + "300-399"
           + "400-499"
           + "500-599"
           + "600-699"
           + "700-799"
           + "800-899"
           + "900-999"
           + ">=1000"
              total,
         least("<100",
           "100-199",
           "200-299",
           "300-399",
           "400-499",
           "500-599",
           "600-699",
           "700-799",
           "800-899",
           "900-999",
           ">=1000") min_val,
          greatest("<100",
           "100-199",
           "200-299",
           "300-399",
           "400-499",
           "500-599",
           "600-699",
           "700-799",
           "800-899",
           "900-999",
           ">=1000") max_val
      FROM t1
    /

  • Select a range of cells using ActiveCell

    I am trying to select a range of cells using ActiveCell.Offset
    This is really testing me, up to now I have this:-
    Private Sub CommandButton1_Click()
        Windows("example.xls").Activate
        With Worksheets("Data").Range("C1:C65536")
        Set c = .Find("", LookIn:=xlValues)
        If Not c Is Nothing Then
        firstAddress = c.Address
        Do
        c.Select
        Loop While Not c Is Nothing And c.Address <> firstAddress
        End If
        End With
        Start_Point = ActiveCell.Address
        ActiveCell.Select
        ActiveCell.Offset(rowOffset:=-50, columnOffset:=0).Activate
        ActiveCell.Select
    End Sub
    I want to select the last 50 cells in column C
    Please help!
    Thanks.

    Windows("example.xls").Activate
        Worksheets("Data").Select
        With Worksheets("Data").Range("C1:C65536")
        Set c = .Find("", LookIn:=xlValues)
        If Not c Is Nothing Then
        firstAddress = c.Address
        Do
        c.Select
        Loop While Not c Is Nothing And c.Address <> firstAddress
        End If
        End With
        Start_Point = ActiveCell.Address
        ActiveCell.Select
        ActiveCell.Offset(rowOffset:=-50, columnOffset:=0).Activate
        ActiveCell.Select
        ActiveCell.Offset(0).Resize(50).Select
        Selection.Copy

  • Which formula(a) do I use to select any value that is than 0 but 7 out of a range of cells and sum them.

    I'm working on a sheet that I want to use to select a specific part based on values created by the sum of values in other cells. I am down to the point where I need to select a low range of numbers
    If the sum of cell D5 equals any sum between 1-15 will equal = part 1
    If the sum of cell D5 equals any sum between 16-23 will equal = part 2 ,
    If the sum of cell D5 equal antsy sum between 24-32 will equal part 3.
    I'm at a loss how to make one formula or combination of formulas do this.
    Thanks in advance.
    Big Al Hur

    Hi Al,
    The confusion arises from your having asked two separate questions, one in the subject line, the other in the body of your initial post.
    1.
    How do I sum only the values greater than zero and less than 7 in a range of cells?
    This formula supplied by SGIII does what you have asked there:
    =SUMIFS(A,A,">0",A,"<7")
    The syntax is:
    SUMIFS(sum-values, test-values, condition, test-values, condition…)
    sum-values ( A ) is the range of cells containing the values to be summed (all the body cells in column A)
    test-values and condition come in pairs. the first names the range of values to be tested, the second names the condition that must be met.
    In this formula, the test-values in each pair are the same as the sum values.
    condition ( ">0" ) is the first condition that must be met by these values. (greater than zero)
    the second condition ( "<7" ) is the second condition that must be met (less than seven)
    To be included in the sum, a value in the list must meet both conditions: It must be greater than 0 AND less than 7. IN SG's example, there are two values that meet both conditions, 2 in A2 and 6 in A5, that meet both conditions. Their sum, 8, is shown in A10, whch is the cell containing the formula.
    2
    If the sum of cell D5 equals any sum between 1-15 will equal = part 1
    If the sum of cell D5 equals any sum between 16-23 will equal = part 2 ,
    If the sum of cell D5 equals any sum between 24-32 will equal part 3.
    This formula supplied by SGIII, and the Lookup table that goes with it, does what you have asked here.
    =VLOOKUP(D5,Lookup::A:B,2,close-match)
    Close-match means 'the largest value that is less than or equal to' the search-value.
    The search-value is the value in D5
    VLOOKUP searches in the leftmost column (A) of the lookup table (columns A and B of the table named Lookup).
    With "close-match" specified:
    any value that is equal to or greater than 0 and less than 16 will be matched by the 0 in A2. VLOOKUP will return the value in the same row of column 2 (B) of the table: "Part 1"
    any value that is equal to or greater than 16 and less than 24 will be matched by the 16 in A3. VLOOKUP will return the value in the same row of column 2 (B) of the table: "Part 2"
    any value that is equal to or greater than 24 will be matched by the 24 in A4. VLOOKUP will return the value in the same row of column 2 (B) of the table: "Part 3"
    While this is not an exact match with your description above, it will perform exactly as you requested IF the value in D5 is never less than 1 and never greater than 32.
    If the possible range is greater than that, I would suggest the changes shown below to the formula and to the lookup table. The column containing numbers is column D, and represents values in D5. Column E shows the result for each value using the given formula and lookup table (LU A). Column F shows results for the same values using the revised formula and lookup tble (LU B):
    Original                              =VLOOKUP(D,LU A :: A:B,2,1)
    Revised formula: =IFERROR(VLOOKUP(D,LU B :: A:B,2,1),"N//A")
    In the revision, IFERROR takes care of the negative values in D2 and D3. The zero value in D4 and in the last row of column D and the overflow values (greater than 32) are handled by the revisions to the lookup table.
    Regards,
    Barry

  • How do I insert  a cell or range of cells in Numbers?

    From what I've read, one has to highlight and move cells to create the space for the new cells.  This may be fine for small tables, but I have an inventory that currently has over 2000 lines of data.  So if I need to add a line of data at row 2, then I would have to highlight 1998 lines of text, which takes a few minutes (holding down the shift and down arrow keys, which only highlights the cells on the screen, so I have to scroll down until my highlighted area ends at the top of the screen, highlight the current page, scroll down, highlight, etc., until I get all 1998 lines highlighted). Then drag them down one line. Then go back up and enter the data.
    Can I just say that that is ridiculously complicated in the year 2012 (almost 2013)?  Why not just have the same insert function that Excel has, where you can insert the cell or range of cells with a couple of keystrokes?
    Is there some easier way to manage this data on my Macbook? Or did I waste $2000 on this computer?   Thanks.

    You may have wasted $20 on Numbers? I don't use it - I've been an Excel user since 1985 and it's still what I use today.
    If, indeed, there's no shortcut for the procedure that you describe (and we'll have to wait for some Numbers experts to chime in on that) why not just buy MS Office 2011 for Mac? You can get a trial version here -> https://www.microsoft.com/mac/trial.
    But, hopefully, a Numbers user will come along with a simple solution...
    Clinton

  • How to Avoid Errors in Max Function When Data Contains Blank Cells

    I have a column with duration values. However, it also contains some blank cells. These "blank cells" have formulas in them, but as the cells they reference too are blank the formula doesn't produce a result.>/p>
    I want to get the max value from this column. When I simply do =MAX(column-name) I get an error, presumably because some of the cells are blank. This table is going to be highly dynamic, so I don't want to limit the range of the MAX() function to only those cells with values.
    So does anyone know a solution for this, please? If I was some how able to create a formula which returned the range of cells with actual values, then I could use that in the MAX() function. Or, if I could somehow tell the MAX() function to ignore blank cells, but I'm not sure either of these are possible.
    Thanks,
    Nic

    I don't see a problem with "blank" (null string) cells mixed with duration cells.  MAX works fine with this mix of cells. But if the "blank" cells are numbers, not text, that gives an error.
    A formula always produces a result. A formula cannot result in a blank cell. The closest you can get to "blank" is a null string (the result of two quotes next to each other with nothing between them) . So the question is, what is the result that you are calling "blank"?

  • Alternative to isblank for a range of cells

    Hi,
    I am trying to get a formula using countifs that will return the number of cells containing a checkbox with a "true" value if a related cell on a different row is not blank.
    In my mind this would look somewhat like =countifs(checkbox range, true, isblank(range b), false)
    Is there a function that does what isblank does for a range of cell? Or should I use another function?
    Thanks for the help!

    Hello,
    The above answers seemed alright but they do not get to the heart of the issue that I am having in trying to get summary data on a range of particular cells +determined by a condition+. For this purpose the SUMIFS and COUNTIFS functions are brilliant because you can isolate a range based on conditions; for example, getting rows with a particular string and number.
    I have a long list of newspapers, each with a city, year and rank by population. There are about 10 decades and many different cities (which change as the rankings change), totaling over a thousand rows. The year, rank and city often repeat but the newspapers are all unique.
    It was easy to count the number of newspapers by rank (or city) and year using COUNTIFS but there seems to be no corollary for the MAX (or LARGE) function. I need this because I have circulation numbers and I'd like to know what the MAX circulation is for each city (or rank) in each year.
    This means I need to be able to pluck out a max value for a range of cells based on a calculation. It seems ridiculous to have to put in row numbers in: there should be a simple way to perform a test on a defined range using conditions.
    Hopefully I am simply missing how that is done. Thanks ahead of time,
    Jamil

  • Using Row Range in GetCell

    Hey all,
    I'm trying to reference a row value in Grid1 from a text column in Grid2. The referenced row in Grid1 is expandable, so I'm using a range, but I'm getting
    Error: Invalid arguments
    Here's what I have
    <<GetCell("Grid1", row[1(2:10)], Cur, Cur)>>
    Is my syntax wrong?
    Eric

    Thanks for your reply. My example should have referenced Grid2, but the concept is the same. Grid1 and Grid2 have identical row/column dimensions and member selections. The only difference is that they have different gridPOV values. So, yes, the number of rows and their expansions should be identical. This may be wishful thinking, but my idea is to call that text function as a "Replace" in one or more Grid1 cells, but referencing Grid2 data like this
    GetCell("Grid2", row[Cur(2:10)], Cur, Cur)
    The desire here is to basically have one grid, Grid1, that displays rows from 2 different POVs, Grid2 would be hidden.
    Eric

  • Numbers   Select a large range of cells

    I select a cell to enter a formula. The key board pops up and I select the Average function. I then try to select a large range of cells, but unable to do so because the Numbers screen will not scroll. I select the cell directly above the keyboard, but when I move my finger up to select 25 rows, I can only move up about 6 rows.
    This is using Numbers on an iPad. What advice can you give me for correcting my error.
    Thanks

    Here is an answer that worked great for me. I found it here:
    Concatenating a Range in Excel
    You'll have to adapt it for your spreadsheet:
    A
    B
    (result)
    1
    Apple
    2
    Baker
    =A1&A2
    AppleBaker
    3
    Charlie
    =B2&C1
    AppleBakerCharlie
    4
    Denver
    =B3&C2
    AppleBakerCharlieDenver
    5
    Edward
    (etc.)
    You just concatenate two cells together (using the '&' concatenation operator), and then in the next cell you just add on to the end of the result. So that by the end, you have them all in one long string.
    You might say "But I have to write out all those formulas". No. As you know, you can just copy the formula to the next cell and Numbers will change the references for you.

  • How can I call a custom javascript function when clicking on cfgrid cell.

    I would like to call a custom javascript function when
    clicking on a cell in an cfgrid (of html format). The closest thing
    I can find is to use the HREF="" attribute, but it doesn't seem to
    work with javascript inside it.
    Simple example:
    <cfgridcolumn name="Foo" header="Foo"
    href="javascript:customFunction(#ID#);">
    Do I need to tap into the underlying Ext JS funtionality? If
    so, where can I start?
    Thanks!

    Hi,
    According to your post, my understanding is that you want to hide/show list columns based on specify the permission for Users, SharePoint Groups or Active Directory Groups.
    Here is a solution from CodePlex for your reference:
    SharePoint 2013 Column & View Permission
    https://sp2013columnpermission.codeplex.com/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Can I call a function using array index?

    I've defined an array which stores the function name, like this:
    var aresetButtonTop:Array = new Array(resetTop1,resetTop2,resetTop3,resetTop4,resetTop5);  
    Then I have a button named"btnresetTop" which when clicked will call one of the five functions stored in the above array(aresetButtonTop). The functions are called at run-time depending upon some conditions. I need to figure out how I can call those functions using the array index. I'm using the following code to call the function. The value of i has been already calculated.
    btnresetTop.addEventListener(MouseEvent.CLICK, aresetButtonTop[i]);
    After doing this I'm getting the following error when I click the button:
    TypeError: Error #2007: Parameter listener must be non-null.
        at flash.events::EventDispatcher/addEventListener()
        at gallerytest_fla::MainTimeline/thumbTopClick()
    Note: thumbTopClick() is a function inside which all these codes are written.
    I need to find out whether it is posible in AS3 to call a function name using the array index or not. If yes, could you pleas ehelp me out.

    Thanx Andrei1, you were right, i was out of range.The value of i will obviously expire outside the for loop. Now I have corrected my mistake by assigning the value of i to a variable index inside the for loop and then use the following code:
    btnresetTop.addEventListener(MouseEvent.CLICK, aresetButtonTop[index])
    It was a silly mistake but I was not able to figure it out for the last 2 hours. Thanks once again for your help

  • How to read and write data in to a specified range of cells(it include multiple row & columns) in excel

    How to read and write data in to a specified range of cells(it include multiple row & columns) in excel

    CVI Comes with a sample project that explains how to read/write to a Excel file: choose "Explore examples..." in CVI welcome page and navigate to <cviSampleDir>\activex\excel folder where you can load excel2000dem.prj.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • OpenCv ,Hls ,Video Processing :How to use hls::Range() to set ROI(Region of Interest)?Help!!!

    Hi,
        I have one problem,I want to use hls::Range() to set ROI(Region of Interest),and  I could not how to use  it corretly.Anyone can help me ? And give me one example. 
    1.  Functions are defined as follows:
    hls::Range
    Synopsis
    template<int ROWS, int COLS, int SRC_T, int DST_T, typename P_T>
    void hls::Range (
    hls::Mat<ROWS, COLS, SRC_T>& src,
    hls::Mat<ROWS, COLS, DST_T>& dst,
    P_T start,
    P_T end);
    Parameter                                                  Description
    src                                                              Input single-channel image
    dst                                                              Output single-channel image
    start                                                            Left boundary value of the range
    end                                                             Right boundary value of the range
    Description
    • Sets all value in image src by the following rule and return the result as image dst.
    • Image data must be stored in src.
    • The image data of dst must be empty before invoking.
    • Invoking this function consumes the data in src and fills the image data of dst.
    • src and dst must have the same size and be single-channel images.
    OpenCV Reference
    • cvRange
    2.I use it  as follow,but it can not work corretly.
    #define MAX_WIDTH 640
    #define MAX_HEIGHT 480
    typedef hls::stream<ap_axiu<32,1,1,1> > AXI_STREAM;
    typedef hls::Scalar<3, unsigned char> RGB_PIXEL;
    typedef hls::Mat<MAX_HEIGHT, MAX_WIDTH, HLS_8UC3> RGB_IMAGE;
    #if 1
    void image_filter(AXI_STREAM& INPUT_STREAM, AXI_STREAM& OUTPUT_STREAM, int rows, int cols) {
    //Create AXI streaming interfaces for the core
    #pragma HLS INTERFACE axis port=INPUT_STREAM
    #pragma HLS INTERFACE axis port=OUTPUT_STREAM
    #pragma HLS RESOURCE core=AXI_SLAVE variable=rows metadata="-bus_bundle CONTROL_BUS"
    #pragma HLS RESOURCE core=AXI_SLAVE variable=cols metadata="-bus_bundle CONTROL_BUS"
    #pragma HLS RESOURCE core=AXI_SLAVE variable=return metadata="-bus_bundle CONTROL_BUS"
    #pragma HLS INTERFACE ap_stable port=rows
    #pragma HLS INTERFACE ap_stable port=cols
    RGB_IMAGE img_0(rows, cols);   
    hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> gray(rows,cols);
    hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> range_1(rows,cols);
    #pragma HLS dataflow
     hls::AXIvideo2Mat(INPUT_STREAM, img_0);
     hls::CvtColor<HLS_RGB2GRAY>(img_0,gray);;
    hls::Range(gray,range_1,50,600);       //     I use hls::Range() like it , is it  right?Help!!!
    hls::CvtColor<HLS_GRAY2RGB>(range_1,img_1);
    hls::Mat2AXIvideo(img_1, OUTPUT_STREAM);
    #endif

    Anyone could help me?

Maybe you are looking for