Extracting rows that match a certain criterion

Hi guys,
I realize that spreadsheet software has certain limitations, but I was hoping I could stretch it a tad bit, by asking if it's possible to take rows that meet a certain criterion and have them listed in another table.
I've included an example wherein I take a list of a few well-known crypto characters and extract those that are not checked as evil (i.e., evil is FALSE) into a different list.
http://pyth.net/hotlinking/cast-salaries.png
I'd appreciate any suggestions; and thanks in advance for any time taken to respond.
Regards,
Friðrik Már

We have posted a solution but now I have to find it. You can test for the "TRUE" / "FALSE" nature of the check box then show related row/column information using VLOOKUP, and IF statements. You could then filter for the presence of a value.
=IF(A2=TRUE,VLOOKUP(...
Regards,

Similar Messages

  • Reorganize function will not allow "select rows that match"

    I'm trying to sort data in a sheet the same way excel lets you sort by using "filter"
    I'm told that using the Reorganize function will allow me to do this especially if I select the "select rows that match" options.
    The only problem is that that options is grayed out and I can't use it.
    Anybody else have any suggestions or instructions>?
    Thanks

    Make sure you have selected a table

  • Can I sort a column based upon a "find" word?  i.e. I want to group all the rows that contain a certain word.  I'm using Numbers '09 on a Macbook Pro.  Thanks for your help!

    A second question: I am creating a database of products for my point of sale system.  I am using a product list sent to me by a vendor.  Can I pull out certain words in their description and add them to a new column.  i.e. The vendors' description in one cell is "Blueridge Guitar Dreadnought."  Can I automatically add the word "Dreadnought" to a new column in the same row?

    You can extract the word case where the string contains case using
    =IFERROR(IF(FIND("CASE",B)>0,"CASE",""),"")
    But that doesn't solve the issue of what goes in that column for lines where the product ins not a case.
    Looking at the other columns, I don't see a means of getting "Hardshell" from the given data using a formula.
    A semi-manual method using the "Show rows... feature of the Reorganize panel might prove efficient.
    Here, the Show rows... displayd was applied, then CASE was entered in the first cell in column A and filled down to the last visible cell. As can be seen below, the fill operation placed "CASE" in only the rows where column B containsed "CASE".
    Regards,
    Barry

  • Counting rows that match 2 criteria?

    I've been hunting for this since yesterday and I know it's gotta be something silly I'm just overlooking, but I'm very new to iWork and spreadsheets in general... any help would be greatly appreciated.
    Basically I've a simple table that tracks two items on each row: a trouble code and a time.
    What I need is a formula that will count all rows in which trouble code 5 occurred at 8pm. It seems like it would be easy... a COUNTIF with an AND statement? But I just can't get the syntax right, or maybe I'm just not picking the right function.
    Thanks!
    Jimmy

    sw33tjimmy wrote:
    Thank you. I had read about the COUNTIFS function, but for some reason I didn't see it in the list of options among all of the other stuff I was trying. It's confusing when formulas aren't standardized across the different spreadsheet platforms.
    Happily, they aren't standardized.
    The Ford T era is gone and I hope that it will never return.
    Yvan KOENIG (VALLAURIS, France) mardi 29 juin 2010 21:04:28

  • Selecting Single Rows that match to a column within group function output

    Trying to write a Query that will look through a data set that will return the Barcodes of CompoundNames that have a summed Quantity > 500.
    So if it was ran against the sample table below the output would be
    0005
    0006
    0007
    0008
    0009
    0010
    Barcode, CompoundName, BatchId, Quantity
    0001, XE 1000, XE 1000 100, 100
    0002, XE 1000, XE 1000 101, 100
    0003, XE 1000, XE 1000 102, 100
    0004, XE 1000, XE 1000 103, 100
    0005, XE 2000, XE 2000 100, 100
    0006, XE 2000, XE 2000 101, 100
    0007, XE 2000, XE 2000 102, 100
    0008, XE 2000, XE 2000 103, 100
    0009, XE 2000, XE 2000 104, 100
    0010, XE 2000, XE 2000 105, 100
    0011, XE 3000, XE 3000 100, 100
    I've got this far
    Select CompoundName, SUM(QUANTITY) FROM Table
    GROUP BY CompoundName
    HAVING SUM(QUANTITY) > 500)
    order by compoundname;
    But I need each Barcode that corresponds to each batchid when the summed quantity of the batches is > 500.
    TIA

    Replacing a GROUP BY Aggregate function by analytic equivalent (using PARTITION BY)
    will return every ROW (limited by where clause) but will not perform
    actual "aggregation operation.
    So it is possible that *selected result set* could contain duplicate row. Of course it depends on columns being seected and input data.
    +Ofcourse OPs sample data returns the same result with or without DISTINCT+
    For example...
    *WITH DISTINCT*
    {code}
    sudhakar@ORCL>with t1 as
    2 (select 0001 barcode,'XE0000' COMPOUNDNAME, 700 quantity FROM DUAL UNION ALL
    3 select 0003 ,'XE1000' , 20 FROM DUAL UNION ALL
    4 select 0003 ,'XE1000' , 280 FROM DUAL UNION ALL
    5 select 0003 ,'XE2000' , 50 FROM DUAL UNION ALL
    6 select 0003 ,'XE2000' , 100 FROM DUAL UNION ALL
    7 select 0003 ,'XE2000' , 150 FROM DUAL UNION ALL
    8 select 0003 ,'XE2000' , 200 FROM DUAL UNION ALL
    9 select 0003 ,'XE2000' , 750 FROM DUAL UNION ALL
    10 select 0003 ,'XE2000' , 120 FROM DUAL UNION ALL
    11 select 0003 ,'XE1000' , 70 FROM DUAL
    12 )
    13 select distinct * from
    14 (
    15 Select Barcode, CompoundName, SUM(QUANTITY) over (partition by CompoundName) sumqty
    16 FROM t1
    17 )
    18 where sumqty > 500
    19 order by compoundname;
    BARCODE COMPOU SUMQTY
    1 XE0000 700
    3 XE2000 1370
    sudhakar@ORCL>
    {code}
    *WITHOUT DISTINCT*
    {code}
    sudhakar@ORCL>with t1 as
    2 (select 0001 barcode,'XE0000' COMPOUNDNAME, 700 quantity FROM DUAL UNION ALL
    3 select 0003 ,'XE1000' , 20 FROM DUAL UNION ALL
    4 select 0003 ,'XE1000' , 280 FROM DUAL UNION ALL
    5 select 0003 ,'XE2000' , 50 FROM DUAL UNION ALL
    6 select 0003 ,'XE2000' , 100 FROM DUAL UNION ALL
    7 select 0003 ,'XE2000' , 150 FROM DUAL UNION ALL
    8 select 0003 ,'XE2000' , 200 FROM DUAL UNION ALL
    9 select 0003 ,'XE2000' , 750 FROM DUAL UNION ALL
    10 select 0003 ,'XE2000' , 120 FROM DUAL UNION ALL
    11 select 0003 ,'XE1000' , 70 FROM DUAL
    12 )
    13 select * from
    14 (
    15 Select Barcode, CompoundName, SUM(QUANTITY) over (partition by CompoundName) sumqty
    16 FROM t1
    17 )
    18 where sumqty > 500
    19 order by compoundname;
    BARCODE COMPOU SUMQTY
    1 XE0000 700
    3 XE2000 1370
    3 XE2000 1370
    3 XE2000 1370
    3 XE2000 1370
    3 XE2000 1370
    3 XE2000 1370
    7 rows selected.
    sudhakar@ORCL>
    {code}
    vr,
    Sudhakar B.

  • Bringing back results that match a certain character type

    Hi, thank you for any help.
    Below is a few values from a field in a database table. I like to bring back the values that only have ###-####. I do not want to bring back any other values that has any other kind of characters in them unless its a number. Thank you
    I want to bring back only         
    105-1110          
    105-1114          
    105-1121          
    105-1125          
    105-1298          
    105-1300  
    I dont want to bring back the ones below.
    001-10            
    001-2-13          
    002-2-10          
    003-43            
    003-52            
    003-87           
    0820-FR           
    1-0-17            
    1-0-18            
    1-0-19            
    1-0-20            
    1-0-22            
    1-0-29            
    1000-SW           
    1030-SW                 
    105-CIFM          
    Edwin Lopera

    One option
    declare @table table(val varchar(10));
    insert into @table
    values
    ('105-1110'),
    ('105-1114'),
    ('105-1121'),
    ('105-1125'),
    ('105-1298'),
    ('105-1300'),
    ('001-10'),
    ('001-2-13'),
    ('002-2-10'),
    ('003-43'),
    ('003-52'),
    ('003-87'),
    ('0820-FR'),
    ('1-0-17'),
    ('1-0-18'),
    ('1-0-19'),
    ('1-0-20'),
    ('1-0-22'),
    ('1-0-29'),
    ('1000-SW'),
    ('1030-SW'),
    ('105-CIFM')
    select * from @table
    where val like '[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]'
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • How to get row count(*) for each table that matches a pattern

    I have the following query that returns all tables that match a pattern (tablename_ and then 4 digits). I also want to return the row counts for these tables.
    Currently a single column is returned: tablename. I want to add the column RowCount.
    DECLARE @SQLCommand nvarchar(4000)
    DECLARE @TableName varchar(128)
    SET @TableName = 'ods_TTstat_master' --<<<<<< change this to a table name
    SET @SQLCommand = 'SELECT [name] as zhistTables FROM dbo.sysobjects WHERE name like ''%' + @TableName + '%'' and objectproperty(id,N''IsUserTable'')=1 ORDER BY name DESC'
    EXEC sp_executesql @SQLCommand

    The like operator requires a string operand.
    http://msdn.microsoft.com/en-us/library/ms179859.aspx
    Example:
    DECLARE @Like varchar(50) = '%frame%';
    SELECT * FROM Production.Product WHERE Name like @Like;
    -- (79 row(s) affected)
    For variable use, apply dynamic SQL:
    http://www.sqlusa.com/bestpractices/datetimeconversion/
    Rows count all tables:
    http://www.sqlusa.com/bestpractices2005/alltablesrowcount/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • IncidentStatusDurationFactvw missing rows that indicate status changes

    I'm having an issue where IncidentStatusDurationFactvw is missing rows that indicate a status change,
    making the TotalTimeMeasure column in this view have incorrect data. For example, an incident will have a created date of 7 days ago, have a status set to pending 6 days ago (verified in the incident's action log), then is resolved today. For
    a majority of incidents, this would includes 3 rows in the IncidentStatusDurationFactvw view.
    But for some incidents, it will only have 2 rows, one for the active status 7 days ago, then one for the resolved status today, which makes the activeTotalTimeMeasure incorrectly equal to 7 days. Or
    sometimes it will only have 1 row for the resolved status, with 0 TotalTimeMeasure since that field correctly has no FinishDateTime value at that point). 
    Has anyone else come across this issue? 

    That looks like exactly what was going on. We had an issue preventing one of our Extract jobs from running under certain conditions, so we would go for several days without a successful extract job, followed by a few successful extract jobs, repeat, etc.
    I was under the impression that the extracts would capture ~past data, but as you pointed out, that's definitely not the case. After resolving the original issue, our extract jobs work correctly and we are seeing expected results. Thanks!

  • To find out the last row that is updated in a View Object

    Hi OAF Gurus,
    I have requirement like,
    I have to find out the last row that is updated on a particular View Object and I have send a mail to the users about the change.
    JegSAMassMobVOImpl vo = getJegSAMassMobVO1();
    JegSAMassMobVO is the View Object Name and it displays certain rows that has already been added to the VO in the Page.
    Now the issue is when a user updates a particular row,I have to find which row gets updated and have to send a email to that particular employee about the change.
    Just want to know,how to find out the last updated row in a particular VO.
    Any Help would be appreciated as this a immediate requirement.
    Regards,
    Magesh.M.K.
    Edited by: user1393742 on May 4, 2011 1:06 AM

    Hi Magesh
    It shoud be a Advanced table ,so when user will update the row ,the specific row will fire the PPR and on that event u can capture the row using row reference ,this is the sample code below
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean); OAApplicationModule am =
    (OAApplicationModule)pageContext.getApplicationModule(webBean);
    String event = pageContext.getParameter("event");
    if ("<ItemPPREventName>").equals(event))
    // Get the identifier of the PPR event source row
    String rowReference =
    pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    Serializable[] parameters = { rowReference };
    // Pass the rowReference to a "handler" method in the application module.
    262
    am.invokeMethod("<handleSomeEvent>", parameters);
    In your application module's "handler" method, add the following code to access the source row:
    OARow row = (OARow)findRowByRef(rowReference);
    if (row != null)
    Thanks
    Pratap

  • Finding text based files containing a keyword/pattern... filtering those that match pattern 2... etc.

    I'm looking to see if Powershell can help me solve a common issue I come across dealing with a large code base / set of files.
    In short I'm very frequently wanting to "grep" for files that contain a certain keyword or pattern... then (recursively) filter that set of files to those that (A) also include or (B) specifically do not include another keyword or pattern.
    e.g.
    Lets say that I have 300 PHP files that are all somewhere within a folder called "project_files".  I'd like to find all files that contain "someInclude.php"... and also contain "specialFunction()"
    Can I do this in one pass... e.g. pipe to pipe to pipe? or do I need to collect the list of file names in the first pass, then re-run the sub-query(/ies)
    $results = Get-ChildItem -recurse -ErrorAction SilentlyContinue | Select-String -pattern "someInclude.php"
    (wrapped code for readability)
    ...this is where I'm stuck as to where to go next...
    Can I iterate over my results? or do I need to write these to a file and read that file back in, searching in each file as I load it?

    Ideally I'd like to get an output at the end that is a result for each match with data including the file, the line number where the match was found, and even the line of text itself.
    I currently have this working for a single keyword search... outputting the final results object to a CSV file
    Get-ChildItem -recurse -ErrorAction SilentlyContinue |
    Select-String -pattern "someInclude.php" -AllMatches -CaseSensitive -ErrorAction SilentlyContinue |
    Select-Object path,linenumber,line |
    Export-Csv "c:\someFolder\MyMatches.csv"
    I wrapped the code above for readability... and in the Select-Object
    path = full file path
    linenumber = the line of the match
    line = the actual (full) line of text that was matched
    However in all honesty the format doesn't really matter... I just want to find the files that meet my criteria ;-)

  • Delete rows that have been dropped in a CDC flow

    Post Author: sgsampey
    CA Forum: Data Integration
    A newbie question:
    I have a source table called Events with (significant) fields that look like:
    EventIDEventNameBeginDateEndDateDaysOfWeekModifyDate
    These data ranges can be quite long, and there's an exception table if the Event isn't being held on a given day
    ExceptionIDEventIDExceptionDate
    I need to flatten this data into a target Event_Instance table of individual days:
    EventInstIDMasterEventIDEventNameDateDayOfWeek
    I'm going to populate the target by combining Event source (filtered by modify date to only grab updates and additions) with a SQL table that creates a range of days, join that with the exception table, and filter based on no match in the exception table. That part's easy.
    The problem I'm having is what do do when an Exception is removed or updated (Events are never removed - just canceled). There's no ModifyDate to look at. I know I need to create a buffer table to track changes, but once I identify execptions (in a Query Transform) that have been added since the last ETL, I don't see how to remove those Event_Instances. The two only solutions I can come up with is to wipe the entire Event_Instance table and rebuild with every ETL, or to add an 'action' field to Event_Instance, updateit to 'D' for those rows that need to be removed and then execute a SQL command to delete those rows once done.. I know there must be a better, incremental way to do this. TIA!

    Your Mobileme galleries should be listed in the library pane on the left. How about creating a new album in the main library and dragging the images from a gallery to the album. Then delete the gallery and recreate it from the album.

  • Compare tables, find rows that are "different"

    A common problem in replication/query-extract-load scenarios is comparing two sets of data, and finding the rows that have changed or are different. A clean solution to this is less obvious than it sounds, because "different" can involve nulls (love them!/hate them!).
    Consider two structurally identical tables with all data linked by a common PK:
    Snapshot A Snapshot B
    PK First Last State PK First Last State
    1 Bob Smith AZ 1 Bob Smith AZ
    2 Louise Jones FL 2 Louise Brown FL
    3 Joe Jones NULL 3 Joe Jones CA
    4 Joe NULL GA 4 Joe Celko NULL
    5 Phill NULL AL 5 Phill NULL AL
    If we are interested in tracking or processing any changes in our data, we would agree that only Rows 1 and 5 are "the same" in both sets A & B.
    Because of null logic, this sql only gets me row 2 (besides being syntactically miserable with a wide table) :
    select A.PK from A inner join B on A.PK = B.PK
    where (A.First <> B.First) OR (A.Last <> B.Last) OR (A.State <> B.State);
    So how can I select rows 2, 3, and 4? (Extra credit for for a query I can type in less than two minutes with a pair of tables that have 42 columns)
    Thanks much,
    Steve Pence
    DBA
    Wycliffe Bible Translators
    Orlando
    [email protected]

    Sorry, my post got mangled by the white space deleterer...
    A common problem in replication/query-extract-load scenarios is comparing two sets of data, and finding the rows that have changed or are different. A clean solution to this is less obvious than it sounds, because "different" can involve nulls (love them!/hate them!).
    Consider two structurally identical tables with all data linked by a common PK:
    Snapshot A
    PK First Last State
    1 Bob Smith AZ
    2 Louise Jones FL
    3 Joe Jones NULL
    4 Joe NULL GA
    5 Phill NULL AL
    Snapshot B
    PK First Last State
    1 Bob Smith AZ
    2 Louise Brown FL
    3 Joe Jones CA
    4 Joe Celko NULL
    5 Phill NULL AL
    If we are interested in tracking or processing any changes in our data, we would agree that only Rows 1 and 5 are "the same" in both sets A & B.
    Because of null logic, this sql only gets me row 2 (besides being syntactically miserable with a wide table) :
    select A.PK from A inner join B on A.PK = B.PK
    where (A.First <> B.First) OR (A.Last <> B.Last) OR (A.State <> B.State);
    So how can I select rows 2, 3, and 4? (Extra credit for a query I can type in less than two minutes with a pair of tables that have 42 columns)
    Thanks much,
    Steve Pence
    DBA
    Wycliffe Bible Translators
    Orlando
    [email protected]

  • Random selection of rows from a 2D array then subset both the rows that were selected and those that were not. Please see message below.

    For example, I have a 2D array with 46 rows and 400 columns. I would like to randomly select 46 data rows from the 2D array. By doing the random selection it means that not all individual 46 rows will be selected some rows may appear more than once as there may be some duplicates or triplicates in the random selection. The importan thing is that we will have randomly selected 46 rows of data (no matter that some rows appear more than once). Then I would like to subset these randomly selected 46 data rows (some which will be duplicated, or triplicated, etc.) and then also find and subset the rows that were not selected. Does this make sense? Then i would like to do this say 10 times for this data set. So that then I will have 2 by 10 data sets: the first 10 each with 46 rows and the other 10 with n rows depending on how many WERE NOT randomly selected. i hope that my explanation is clear. I am relatively new to Labview. It is really great so I am getting better! If anyone can help me with this problems it will be great. RVR

    Start by generating randon #s between 0 and 45. Run a for loop X times and in it use the random function, multiply the result by X and round down (-infinity). You can make this into a subVI, which you can reuse later. In the same loop, or in a different one, use Index Array to extract the rows which were selected (wiring the result out of the loop with auto indexing causes it to be rebuilt into a 2D array).
    One possible solution for the second part would be to go over the array of randomly generated numbers in a for loop and use Search 1D Array to find each of the numbers (i). If you get -1, it means the row wasn't selected and you can extract it.
    I hope this puts you on the right path. If not, don't be afraid to ask more.
    To learn more about LV, I suggest you read the LabVIEW user manual. Also, try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide.
    Try to take over the world!

  • How do I get a sum of cells for rows that contain a text in a drop down menu?

    I am trying to track individual sales with each of my vendors. I have a column of drop down menu's that list each of my vendors. I am trying to associate a dollar amount for a single transaction in a row that is associated with a vendor and get a sum for all of my single trasactions with that vendor for the year. I have used =countif to build a pie chart of % of transactions per vendor now I am trying to get a dollar amount as well
    Thanks in advance
    Don

    HI Don,
    COUNTIF will count, SUMIF will sum.
    The main difference between them is that COUNTIF works with data in a single column—in this case the column containing the vendor names—while SUMIF uses two columns—the vendor names to decide which rows to include in the sums and the amount column to determine the amount to incude.
    Example:
    Main: Vendor names in column A, descriptions in columns B and C, and dollar amounts in column D
    Summary: Vendor names in column A, Number of transactions in column B, Dollar totals in column C
    Formulas inn Summary (both are entered in row 2 and filled doen to the last row):
    B2: =COUNTIF(Main :: $A,A2)
    C2: =SUMIF(Main :: $A,A2,Main :: $D)
    Regards,
    Barry

  • I've "successfully" installed the latest version of Flash Player. How do I find where it "lives" so that I'm certain it's in there. Also, do I put the App icon in the trash now? (I am on a Mac) Thank you!

    I've "successfully" installed the latest version of Flash Player, as recommended by Firefox. How do I find where it "lives" so that I'm certain it's in there. Also, do I put the App icon that appears on my desktop, in the trash now? I am on a Mac and I am not technically inclined.
    Thank you!

    Your list of plugins shows that you have installed Flash 10.2 r152 which is the current release version.
    You can also confirm that Flash is installed by visiting this link - http://www.adobe.com/software/flash/about

Maybe you are looking for

  • Lightroom no longer starts on Windows 8.1 PC

    Creative cloud user on Win8.1 PC. Photoshop, AE, PP and Audition all work great on the same PC. Lightroom pre 5.4 ran just fine. Since 5.4, it hangs when it starts. The user interface loads, but the splash screen never goes away, and Windows eventual

  • Invoice List Output

    Hello Friends, I am having issue with Invoice list output, when I  print my invoice it prints the shipping  quantity of material only as only ONE even when there is a multiple quantity, I want my invoice list output to print exact amount of quantity.

  • I upgraded Safari, and now it won't work at all.

    I have 10.3.9 and upgraded to Safari 4, which I found out too late is not compatible. It used to be you couldn't even install software that wasn't. Anyway, after I went through the whole process, I clicked to start up Safari, and it won't open. It ac

  • Quartz Filters

    Does anyone happen to know why the "quartz filters" in this thread just trashed a number of my pdf's with images in them? I have some images that went from color to a very bad black and white and some color images that went to all green with no defin

  • Moving iPod touch contents to new device

    I lost my iPod touch back in March. Have tried finding my device, and it always says Offline. I have a new iPod touch being delivered today. How do I go about getting all the apps, music, etc. from the backup of my old iPod to my new one? Thanks