+ Reply to Thread
Results 1 to 7 of 7

If function question

  1. #1
    Registered User
    Join Date
    08-25-2016
    Location
    norfolk, virginia
    MS-Off Ver
    2010
    Posts
    3

    If function question

    Hey everyone,

    I have a question about an If function I am trying to write. Basically I am referencing from a different page and I am trying to create a table that just shows the items that have an X by their name. There will be only one X per column and it will directly reference the item name on the same row. I found a way to do it but it is extremely time consuming and I was hoping someone here would have a more efficient way to pose the formula. This is what I currently have.

    =IF(parts!E2="x",parts!B2,IF(parts!E3="x",parts!B3,IF(parts!E4="x",parts!B4,.....etc

    This works fine for a few rows but I have to go to row 100 in some cases. Any help would be much appreciated even if it is just telling me what to google because I cant figure out exactly what you would call that sort of If condition in excel.

    Thanks in advance.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: If function question

    What you need is a table and a simple VLOOKUP formula that refers to it. Something like the yellow cells in the attached file.
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 08-25-2016 at 01:00 PM.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: If function question

    Sounds like you want something like this...

    Data Range
    B
    E
    F
    G
    1
    ------
    ------
    ------
    ------
    2
    Data1
    x
    Data1
    3
    Data2
    x
    Data2
    4
    Data3
    a
    Data8
    5
    Data4
    s
    6
    Data5
    g
    7
    Data6
    d
    8
    Data7
    h
    9
    Data8
    x
    10
    Data9
    c


    This array formula** entered in G2:

    =IFERROR(INDEX(B:B,SMALL(IF(E$2:E$10="X",ROW(E$2:E$10)),ROWS(G$2:G2))),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down until you get blanks.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: If function question

    Two different interpretation... If neither are correct; please attach a sample workbook.


    Make sure there is enough data to demonstrate your need. Make sure your desired results are shown, mock them up manually if necessary. Remember to remove ALL confidential information first!!!

    However, nothing on this Forum works quite as well as you might expect. The attachment icon doesn't work!! (Helpful, isn't it!!). Instead, just before you submit your post, click on GO ADVANCED (near the bottom) and then scroll down to Manage Attachments to open the upload window. The relevant instructions are at the top of that screen.

  5. #5
    Registered User
    Join Date
    08-25-2016
    Location
    norfolk, virginia
    MS-Off Ver
    2010
    Posts
    3

    Re: If function question

    I am trying out each idea and seeing if it works for me I will let you guys know once I have tested it again.

  6. #6
    Registered User
    Join Date
    08-25-2016
    Location
    norfolk, virginia
    MS-Off Ver
    2010
    Posts
    3

    Re: If function question

    Tried out both and Tony Valko yours does more what I was looking for though I had some trouble referencing from a different page but I just shortcut by referencing the cell on that page so it copies over the information I need. Thanks a bunch been a huge help

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: If function question

    You're welcome. Thanks for the feedback!

+ 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. [SOLVED] Workbook_BeforeSave Question Function Question
    By thomasmc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-24-2015, 01:44 PM
  2. [SOLVED] IF function combined with another IF function question
    By Nexion21 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2013, 05:13 PM
  3. IF function question
    By blue_izce8 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-11-2013, 06:47 AM
  4. [SOLVED] Dir function question
    By Blue_Diamond in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-08-2012, 09:46 PM
  5. IF and NOT function question
    By Bonnie Haring in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-19-2010, 09:31 AM
  6. IF Function Question:SUMIF function
    By VBA Noob in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-03-2007, 03:28 PM
  7. Function question
    By Jock W in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-06-2005, 10:06 AM

Tags for this Thread

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