+ Reply to Thread
Results 1 to 6 of 6

return value from row where column equals "y"- problem with skipping rows

  1. #1
    Registered User
    Join Date
    04-23-2014
    Location
    Vancouver
    MS-Off Ver
    Excel 2003
    Posts
    8

    return value from row where column equals "y"- problem with skipping rows

    I want to look down column D. If a cell if that column ="y", I want the formula to return the cell on column A in the same row. I want all these results in an unbroken list.

    if I just use
    =IF(D:D="y",A:A,"")

    I get the results I want, but they display on the corresponding rows, skipping rows where the cell in D ="n". How can I solve this?

    Thanks very much for any help!

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: return value from row where column equals "y"- problem with skipping rows

    Your explanation a bit confusing but I think you looking for something like this.

    =INDEX(A:A,SMALL(IF($D$1:$D$9="Y",ROW($D$1:$D$9)),ROWS(E$1:E1)))

    ***Array formula must be entered by using key combination of CTRL+SHIFT+ENTER and not just ENTER

    Row\Col
    A
    B
    C
    D
    E
    1
    45
    y
    45
    2
    N
    15
    3
    15
    y
    54
    4
    N
    56
    5
    45
    N
    6
    N
    7
    54
    y
    8
    N
    9
    56
    y
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: return value from row where column equals "y"- problem with skipping rows

    A less formulaic approach:
    1) click on row 1
    2) Turn on the Data > Filter
    3) Filter column D for "y"

    All irrelevant rows are hidden until you change/remove the filter. You can copy the visible rows elsewhere if you really feel you need to, but I typically just deal with the results right there in the original data.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    04-23-2014
    Location
    Vancouver
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: return value from row where column equals "y"- problem with skipping rows

    That's exactly what I was looking for. Thank you both!!! I am using AlKey's suggestion but both would work.
    Last edited by Erin K; 07-31-2015 at 06:42 PM.

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: return value from row where column equals "y"- problem with skipping rows

    You're welcome and thank you for the feedback!

    Please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools -> Mark thread as Solved).

  6. #6
    Registered User
    Join Date
    04-23-2014
    Location
    Vancouver
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: return value from row where column equals "y"- problem with skipping rows

    Quote Originally Posted by AlKey View Post
    You're welcome and thank you for the feedback!

    Please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools -> Mark thread as Solved).
    Thanks again! As you've probably guessed, I'm really new to this.

+ 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. If Cells Equals "1" Return Specific Cell, If not Return Nothing
    By seannydj in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-05-2014, 12:15 PM
  2. Replies: 6
    Last Post: 03-14-2014, 05:18 AM
  3. Return Column Header for Cell Range that equals "1"
    By kibbles in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-11-2013, 11:10 AM
  4. Replies: 3
    Last Post: 04-14-2013, 11:53 PM
  5. if cell equals "value" then return that entire row to another worksheet
    By juliehight in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-26-2012, 03:36 PM
  6. [SOLVED] Delete row if cell in Column N equal "Different" or Column P equals "Blank"
    By Cyberpawz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2012, 08:25 AM
  7. Sumproduct with column that "contains" instead of "equals"
    By Portuga in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-11-2008, 03:26 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