+ Reply to Thread
Results 1 to 11 of 11

Return Cells in Column that Match Criteria

  1. #1
    Registered User
    Join Date
    07-20-2019
    Location
    Miami
    MS-Off Ver
    365
    Posts
    69

    Question Return Cells in Column that Match Criteria

    Hello,

    I would like to return cells in 2 columns that match certain criteria (exclude non matches and blanks). In one of my examples, I'm trying to get all cells that are an URL with the following (can't save due to error):

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Any suggestions?
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-18-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2016 / 2019
    Posts
    251

    Re: Return Cells in Column that Match Criteria

    Hi Philchi,

    I think array may not work with match cell ( other guru correct me if I am wrong)

    use =INDEX($B:$B,SMALL(IF(ISNUMBER(MATCH($A:$A,H14,0)),MATCH(ROW($A:$A),ROW($A:$A)),""),ROWS($A$1:A1)))
    Attached Files Attached Files
    Christopher Yap

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: Return Cells in Column that Match Criteria

    .
    Perhaps I've misunderstood your goal ... but try this :

    In C5 paste : =IF(OR(A4="Impression",A4="Click"),A4,"")

    In D5 paste : =IF(OR(C5="Impression", C5="Click"),B3,"")

    Then drag down both columns.


    Keep in mind you are using numerous MERGED CELLS. It would be best to NOT USE MERGED CELLS. They are the bane of Excel
    and create more problems and issues than they are worth.

  4. #4
    Registered User
    Join Date
    07-20-2019
    Location
    Miami
    MS-Off Ver
    365
    Posts
    69

    Re: Return Cells in Column that Match Criteria

    Apologies if I'm not explaining correctly, my goal to to get every cell with either "Clicks or Impressions" and every column that is a URL - as separate entities removing blanks.

    GOALS (from the spreadsheet).
    1st Column: Only want cells that are "Click" or "Impression"
    2nd Column: Only want cells that are URLs

    @Christopher - your solution attempts to find every URL where H exists, I just want every instance of "Click" or "Impression" from column A (exclude everything else) and in a separate column, every URL in B (excluding everything else).
    @Logit - I would have blank rows in the new columns with that approach, I want every instance excluding the resulting non matching values (blanks)

  5. #5
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: Return Cells in Column that Match Criteria

    .
    Ok ... better understood now.

    My approach would use VBA Macro.

    You still need to rid the worksheet of merged cells.

  6. #6
    Forum Contributor
    Join Date
    03-18-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2016 / 2019
    Posts
    251

    Re: Return Cells in Column that Match Criteria

    Hi Phil

    Pardon me don't quite understand your requirement, however if you just want to clean and format (remove all the blanks etc) to achieve the final result, Power query can do the job (as attached)
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,848

    Re: Return Cells in Column that Match Criteria

    Since you are on O365, you can use the new dynamic array formulas for this. Use this formula for the Type:

    =FILTER(A:A,(A:A="Impression")+(A:A="Click"))

    I'm not sure how you want to determine if the value is a URL, but maybe this:

    =FILTER(B:B,LEFT(B:B,4)="http")

    The attached shows these formulas giving the same result as in your example.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-20-2019
    Location
    Miami
    MS-Off Ver
    365
    Posts
    69

    Re: Return Cells in Column that Match Criteria

    Thanks Gregb11, unfortunately my company is on the Semi-Annual release schedule so we aren't scheduled to get Dynamic Array support until the July Microsoft release. In my version of Excel, it converted your Dynamic Array (FILTER) into the old style CSE behind the scenes but without changing the cell refernce. Is there an equivalent current array formula I can use?

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    07-20-2019
    Location
    Miami
    MS-Off Ver
    365
    Posts
    69

    Re: Return Cells in Column that Match Criteria

    The Moderator believes this is the same question, closed my other thread and asked me to post this ere. I have a column that has a mix of content, empty and blank strings from formulas and I simply want a list of all of the cells with values in them. This spreadsheet will live n SharePoint so I cannot use Macros, VBA or Power Query.

    TYPE Cell Display
    Text Test1
    Formula of =""
    Number 12345
    Empty cell
    Text Test3
    Empty cell



    What I want back
    Test1
    12345
    Test3

    I've tried several variations of the following, but one way or another I get incorrect values or "0" instead of the cell's value.


    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Thanks
    Attached Files Attached Files

  10. #10
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: Return Cells in Column that Match Criteria

    Try this in J2. Use Ctrl+Shift+Enter (instead of just Enter) and then drag down
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    07-20-2019
    Location
    Miami
    MS-Off Ver
    365
    Posts
    69

    Re: Return Cells in Column that Match Criteria

    Thanks Crowater - that worked!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. 2 workbooks/need to match 3-4 criteria and return text from a column/Nested Vlookup?
    By camouflagewoman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-29-2018, 06:09 PM
  2. Replies: 3
    Last Post: 01-18-2016, 10:18 AM
  3. [SOLVED] Return Multiple values from a column with index and match, and search criteria
    By marcusduton in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 02-15-2015, 09:59 PM
  4. I want match 2 criteria and search column and return value based on a value
    By laliparker in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-15-2014, 11:41 AM
  5. Replies: 1
    Last Post: 07-03-2013, 12:14 AM
  6. [SOLVED] Need to return date (or column referance) of last criteria match on Attendance Workbook
    By sdavison in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-19-2013, 02:34 PM
  7. Replies: 3
    Last Post: 06-15-2012, 04:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1