Find row number of first cell in a relative range that is less than $B$3

Thanks for any help. I've spent hours searching, trying, and reading iWork Help
Example:   $B$3 = 3
Column C
1:  9
2:  2
3:  9
4:  2
5:  3
6:  9
7:  9
Find the first occurrence that is less than $B$3 (=3) in the range C3:C6. Return the row # (relative to the range, or actual row number, I don't care)
Fill Down the formula, so the next cell looks at the range C4:C7
In this case, I want it to return Row 4 (not 5 or 2)
Tried this with MATCH (last argument -1 or 1) which almost works, but if it finds an exact match, it returns that row (5) instead of the first one (4)

The single formula in D2, filled down that column, returns the row number of every row where the value in column C is less than or equal to the value in $B$3.
The second formula, which I placed in B4, but which can go wherever it's needed, searches a limited range of column D for the minimum value in that range.
In the example, based on your initial question, the range is three cells.  In B4, it's D2:D4; in B5 it's D3:D5, etc., with Numbers automatically adjusting the cell references as the formula is filled down the column. In each case, the formula returns the minimum value it finds in the three cell range, which is the row number on which the value in column C first meets the condition (less than or equal to $B$3) within that three cell range.
In the second example, the formula retrieves the same value (the row number) as above, but instead of displaying it, uses it as the row-offset value in an OFFSET statement to return the Date from the row where the row number was collected.
NOTE: Looking back at it, I see that in my rush to other duties I made an error in this formula, setting the row offset too high. Revise the formula as shown below to get the date from the correct row:
Existing: =IF(MAX(D2:D4)=0,"",OFFSET($A$1,MIN(D2:D4),0))
Revised: =IF(MAX(D2:D4)=0,"",OFFSET($A$1,MIN(D2:D4)-1,0))
You wrote:
If I'm following the logic, it would require one column (like D in this example) for every set of rows searched (in my example, B5:B15  filled down, so the next search is B6:B16 and so on).
No. Provided the values of X and Y are constant for each set of searches, you'll need an auxiliary column for each column of values to be searched. One auxiliary column is used to mark the rows in which the value in B meets the condition ">x", the second to mark the rows where the value in C meets the condition "<y".
The search formula (above) searches a subset of its column and returns the lowest row number where the condition for that column is met,and either displays that number or uses it to return and display a date.
Regards,
Barry

Similar Messages

  • Error: The number of configured copies for database 'DB-1' (1) is less than the required redundancy count (2).

    Hello , I think the below event alert 4113 is very common and is due to that only one database copy is present in DAG but is there any way we can stop this alert for the
    specific database.  
    The message tells that there is only one copy of the database - create another copy and the warning message will go away but
    we do not want to create another copy. So is there any way we can stop this event getting generated.
    Database redundancy health check failed.
    Database copy: DB-1
    Redundancy count: 1
    Error: The number of configured copies for database 'DB-1' (1) is less than the required redundancy count (2).
    Name                 Status RealCopyQueu InspectorQue  ReplayQueue      CIState
                                           e          
    ue                          
    DB-1\       Mounted            0            0            0     
    Healthy
    MAILSRV2
    ===============
     Full Status
    ===============
    Identity                         : DB-1\MAILSRV2
    Name                             : DB-1\MAILSRV2
    DatabaseName                     : DB-1
    Status                           : Mounted
    MailboxServer                    : MAILSRV2
    ActiveDatabaseCopy               : MAILSRV2
    ActivationSuspended              : False
    ActionInitiator                  : Unknown
    ErrorMessage                     :
    ErrorEventId                     :
    ExtendedErrorInfo                :
    SuspendComment                   :
    SinglePageRestore                : 0
    ContentIndexState                : Healthy
    ContentIndexErrorMessage         :
    CopyQueueLength                  : 0
    ReplayQueueLength                : 0
    LatestAvailableLogTime           :
    LastCopyNotificationedLogTime    :
    LastCopiedLogTime                :
    LastInspectedLogTime             :
    LastReplayedLogTime              :
    LastLogGenerated                 : 0
    LastLogCopyNotified              : 0
    LastLogCopied                    : 0
    LastLogInspected                 : 0
    LastLogReplayed                  : 0
    LogsReplayedSinceInstanceStart   : 0
    LogsCopiedSinceInstanceStart     : 0
    LatestFullBackupTime             :
    LatestIncrementalBackupTime      :
    LatestDifferentialBackupTime     :
    LatestCopyBackupTime             :
    SnapshotBackup                   :
    SnapshotLatestFullBackup         :
    SnapshotLatestIncrementalBackup  :
    SnapshotLatestDifferentialBackup :
    SnapshotLatestCopyBackup         :
    LogReplayQueueIncreasing         : False
    LogCopyQueueIncreasing           : False
    OutstandingDumpsterRequests      : {}
    OutgoingConnections              :
    IncomingLogCopyingNetwork        :
    SeedingNetwork                   :
    ActiveCopy                       : True
    Thanks

    That regex looks odd to me.  I assume you have databases with names like "Mailbox Database <ten digit number>" (standard Exchange default name, in other words), "ABC-DB" and "HOME-DB".  If this is the case, wouldn't
    you want "(?:Mailbox Database \d{10}$|^ABC-DB$|^HOME-DB$)"?  THis works if I run it from a prompt:
    [PS] C:\Scripts>"Mailbox Database 0123456789" -match "(?:Mailbox Database \d{10}$|^ABC-DB$|^HOME-DB$)"
    True
    [PS] C:\Scripts>"Mailbox Database 123456789" -match "(?:Mailbox Database \d{10}$|^ABC-DB$|^HOME-DB$)"
    False
    [PS] C:\Scripts>"Mailbox Database 12345678910" -match "(?:Mailbox Database \d{10}$|^ABC-DB$|^HOME-DB$)"
    False
    [PS] C:\Scripts>"HOME-DB" -match "(?:Mailbox Database \d{10}$|^ABC-DB$|^HOME-DB$)"
    True
    [PS] C:\Scripts>"ABC-DB" -match "(?:Mailbox Database \d{10}$|^ABC-DB$|^HOME-DB$)"
    True
    [PS] C:\Scripts>"ABCD-DB" -match "(?:Mailbox Database \d{10}$|^ABC-DB$|^HOME-DB$)"
    False
    [PS] C:\Scripts>"HOM-DB" -match "(?:Mailbox Database \d{10}$|^ABC-DB$|^HOME-DB$)"
    False
    I find it's easiest to test RegEx's from the prompt this way.  If the above isn't your goal, let us know, and we'll see if we can come up with something better.

  • How do you send text message to a number that is less than ten didgits?

    How do you send text messages on the iPhone, to a number that is less than 10 digits? And example of this might be a number from the radio station.

    i got the same....the ones tht charge u 9.99 a month. i didnt even open it nd it still charged me. i already had them blocked on all my phones through verizon sumhow it went through. so i jus called up verizon again explained wut happened nd they took it off, all the charges. so mayb jus go down to ur local verizon store and tell them u want them blocked from coming to ur phone. hope i helped u out!! good luck

  • How do I find serial number to register and buy a downloaded trial that I have?

    Just need to find serial no. for downloaded trial. This is rediculous.

    The trial, being a trial, does not require a serial number. Download the Adobe provided installer from Adobe's web space and install.
    Be well...

  • Serial Number is correct but no product related to that serial number can be found on the computer. I have downloaded Acrobat XI Pro. Any suggestions?

    Serial Number you provided is correct but a qualifying product could not be found on this computer. This is a message I get when when doing a serial number upgrade. There is no Acrobat XI Pro in the drop down list to endorse against the serial number. Any suggestions how to proceed with this one?

    That message indicates you have purchased an upgrade version and it is asking you to identify the older version that you are upgrading from... the one that qualifies you to use the upgrade version.  It will also require you to provide the serial number for that older version.

  • HT1766 I was gave an Ipod that I can't do anything with, how do I find the original owner when the person giving this to me was less than honest?

    I was gave an Ipod I believe to have been stolen. How do I get in contact with its original owner?

    Contact the police.

  • TableView -- get the row number of the top most current visible row

    Is there any way to get the row number of the top most visible row, and or bottom most visible row in TableView?

    If you already know the document's name, the sheet's name and the table's name, the easy way is :
    --Here you may replace the three values by the current ones
    set dName to 1
    set sName to 1
    set tName to 1
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
    tell first cell of the selection range to set {rowNum1, columnNum1} to {address of its row, address of its column}
    tell last cell of the selection range to set {rowNum2, columnNum2} to {address of its row, address of its column}
    end tell
    Yvan KOENIG (VALLAURIS, France) mercredi 9 février 2011 17:22:21

  • I can't get the row number of the current selection

    Hi all,
    How can I get the row number of a selection if I don't know the range selected? I need it to store in variable.
    I've tried in many ways, but unsuccesfully.
    Thank's in advance.

    If you already know the document's name, the sheet's name and the table's name, the easy way is :
    --Here you may replace the three values by the current ones
    set dName to 1
    set sName to 1
    set tName to 1
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
    tell first cell of the selection range to set {rowNum1, columnNum1} to {address of its row, address of its column}
    tell last cell of the selection range to set {rowNum2, columnNum2} to {address of its row, address of its column}
    end tell
    Yvan KOENIG (VALLAURIS, France) mercredi 9 février 2011 17:22:21

  • How to find the number of occurance of a string in text field of Infopath form?

    Hi All,
    In Infopath text field, How to find the number of occurrence of a particular string in that field?
    Thanks in advance!

    You can check to see if it contains a string once by using the contains function, but there isn't a very clean way to do what you want. If you wanted to guess at the maximum number of occurrences, then you could:
    Box A has your initial. Set Box B to do a concat of string-before and string-after of Box A where it copies Box A minus the string we're looking for. Then we have Box C that does the same thing to Box B. Repeat as many times as you see necessary.
    Example:
    String: "1"
    Box A - "123451234512345"
    Box B - "23451234512345"
    Box C - "2345234512345"
    Box D - "234523452345"
    etc.
    We then have a field that has nested ifs looking backwards from Z -> A looking for a non-blank. Based on that, we return the number of occurrences. Again, this isn't clean, but it will work if you think there's a predefinable maximum.
    Andy Wessendorf SharePoint Developer II | Rackspace [email protected]

  • I want to put a number in a cell and tell it to times by 2 and get the result as a total further along. Sorry couldn't find the answer in any tutorial.

    I want to put a number in a cell and tell it to times by 2 to give the result i another cell?  Sorry couldn't find the answer in any tutorial.

    Hi Caakie,
    Sounds like tou need some basic information.
    The best advice I can give someone new to Numbers (and to spreadsheets in general) is to download and read at least the first four chapters of the Numbers '09 User Guide. You'll find a download link in the Help menu in Numbers '09.
    When you want to start using more complicated formulas, you'll also need the iWork Formulas and Functions User Guide, available from the same menu.
    Regarding your question: "Can you just give me the string for B which is just add and C which is *2."
    What is to be added in "B"? What is to be multiplied by 2 in "C"?
    =2+3 will return the result 5.
    =A+B will return the sum of the numbers in column A and column B in the same row as the cell containing the formula. If either A or B contains a non-numerical value, the formula will return an error message.
    =3*2 will return the result 6.
    =A*B will return the product of the numbers in column A and column B in the same row as the cell containing the formula. If either A or B contains a non-numerical value, the formula will return an error message.
    Regards,
    Barry

  • Can I change the fill color of an entire row based on what's selected in a pop-up menu in the first cell?

    I have a pop-up menu in the first cell of every row with three choices (and I may add more at a later date).  I want the fill color of the row to change depending on which thing is selected.  Is this hard to do?

    Hi,
    In essence the same as Wayne's answer, but with a slight modification to fit  to duplicate your 'color the whole row' specification. The final result, with Table 2 slid behind Table 1, is shown.
    Table 2 is a single column table with the same number of rows as Table 1. The table is resized to match the full width of Table 1.
    In A2, use the formula =Table 1::A2 to copy the value from that cell in Table 2. Fill the formula down through the rest of the column.
    Select all the cells in Table 2 (except the header row), and apply conditional formatting rules such as those below.
    Note that the Conditional Format rules are set to apply the same colour to text and fill in the cell, so that the text disappears.
    When Table 2 is ready, select it, then go Arrange > Send to Back.
    Before sliding Table 2 behind Table 1, Select Table 1 and use the Table Inspector to set the Cell Background to None (see red arrow in illustration). If This table has a Header column, you need to select the header cells independently and again set the Cell Background to None.
    Now select Table 2 and drag it to a position partially under Table 1. When you see the blue alignment guides on both sides, or at the top and bottom, of Table 1, release the mouse button and use the arrow keys to nudge Table 2 into its final position.
    Regards,
    Barry

  • Find row Index of edited matrix cell

    Hai,
    I have designed a matrix which shows some value. The user is allowed to edit the values in Matrix cell. I want to update the edited value in no object table.Is there any way to find out the row indexes of edited cell of matrix.
    If so, How to achieve this?
    Thanks in Advance.

    Using the validate is the same as any other itemevent: C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\CSharp\02.CatchingEvents
    The event will be raised when a user exits a field but in this case I don't think it's what you need.
    You should:
    1. Put a button on your form,
    2. when the user clicks it, loop through the matrix
    3. Check the Titles, and if they are different to what is in the No Object UDT, do step 4
    4. Update the table.
    These are important SDK concepts and you should invest some time in learning how to use both the Matrix Object and the UserTables object. The SDK helpfile provides sample codes.
    For example, the following method can be used to update a record in a UDT
    Private Sub Add_Data_Click()
        Dim oUserTable As SAPbobsCOM.UserTable
        Set oUserTable = oCompany.UserTables.Item("NoObjectTableName")
        oUserTable.GetByKey ("CodeOfValueInNoObjectTable")
        'Set default, mandatory fields
        oUserTable.Name = "Title"
        'Set user field
        oUserTable.UserFields.Fields.Item("U_AdditionalUDF").Value = "1"
        ret = oUserTable.Update
        If ret <> 0 Then
            oCompany.GetLastError ret, Str
            MsgBox Str
        Else
            MsgBox "Value to field: '" & oUserTable.UserFields.Fields.Item("U_AlbUDF").Name & "' was updated successfuly to " & oUserTable.TableName & " Table"
        End If
    End Sub
    I do not have the time to write up a full routine for this, but this information should be enough to get you started. Also check the SDK samples C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\CSharp\06.UseMatrix
    Edit: To answer your intial question, there is no indicator on the matrix object which shows which rows are edited - you have to implement a logic that checks this yourself.
    e.g. you could use the validate event to store the row number (pVal.Row) in a List that you can then use later after the user clicks the button.

  • First Cell value in the first row of the structure not getting displayed

    Hi Friends,
                     We've got one structure at rows level, there as per our requirement i've taken around 12 "New Selections", that's ok i'm getting everthing fine, but whatever the new selection i put on the top of that structure in that, the First Cell Value for the first column not getting displayed...
                       I'm really wondering, this is the first time that i'm facing this kind of problem... what might be the reason & what is the solution for that...
    just awaiting for your inputs...
    Regards,
    Balaji Reddy K.

    There is no declarative way to do this as the table rows are stamped. This means there is no way to can access a value like (row+1).attributename
    So there is some coding needed. Check http://lucbors.blogspot.de/2012/02/adf-11g-fancy-master-detail-or-how-to.html and http://lucbors.blogspot.de/2012/02/adf-11g-even-fancier-multi-master-multi.html which might help you to implement your case.
    Timo

  • Trying to find the number of rows in a ResultSet

    I am trying to find the number of rows in a ResultSet, using the following code:
    rs = st.executeQuery(query);
    rs.last(); // to move the cursor to the last row
    System.out.println(rs.getRow());
    However, I am getting this error:
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unsupported method: ResultSet.last
    Whats going wrong??

    praveen_potru wrote:
    You might have not used scrollable result set..
    Try like this:
    stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);rs = stmt.executeQuery(sqlString);
    // Point to the last row in resultset.
    rs.last();
    // Get the row position which is also the number of rows in the ResultSet.
    int rowcount = rs.getRow();
    System.out.println("Total rows for the query: "+rowcount);
    cheersAnd I hope the OP would read it because the thread is a year old.

  • Can we find the number of rows in table from the dump file

    Hi All,
    Can we find the number of rows in table from the dump file with out importing the table in to the database?
    Please let me know ,if any option is there.
    Thanks,
    Kumar.

    <s>Try to import with option SHOW=Y, that should skip the number of rows which are into a table from a dump file.</s><br>
    <br>
    Nicolas.<br>
    Oops, sorry, that doesn't show the number of lines...<br>
    Message was edited by: <br>
    N. Gasparotto

Maybe you are looking for

  • The Design Tool is not appearing in webdynpro(ECC 6.0)?

    hi friends, when i tried to create a webdynpro, the design tool bar not appearing when i choose Window .I wat to create like LABEL, TEXTFELD, BUTTON. Is i have to change any settings to appear design tool. Regards, shankar.

  • ITunes wont sync after first sync from start up....

    I'm having troubles with my iPod 80 gig First off, I can sync the ipod if I add the new song, movies, etc. then restart the computer. Upon restart, it will open itunes, sync it, and then idle. After this, I cannot sync it again w/o doing the above pr

  • Can i delete a page from my pdf document?

    can i delete a page from my pdf document?

  • Letting VGA output TV signal

    Hey guys, I'm building an arcade cabinet and i'm trying to hook my arcade monitor up to my video card. I know it is possible to connect it directly to the video card but i have to let the VGA port output a TV signal. it's an NVidia GeForce4 MX 440. i

  • Automated export appearing on database list

    Hello, I have an Azure SQL Database (Web edition) with an automated export set for daily exports. Sometimes (like today for instance) when I log into Azure management portal, I see an additional database listed with the name of my export. As far as I