+ Reply to Thread
Results 1 to 3 of 3

Need Help with IF Statement Formula

  1. #1
    Registered User
    Join Date
    02-25-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Need Help with IF Statement Formula

    Hello,

    I need some help with the following scenario. Please see the attachment for an illustration. Basically, I am looking to check the values in Sheet 1 ,Column E and for every cell which contains a value of '1', I'd like to pull the corresponding value from column A without leaving any blank or 'false' cells into Sheet 2, Column A, thus completely ignoring the Sheet 1, Column A values which have '0' as their corresponding value in Sheet 1, Column E. Ideally, I would also like to pull the 'data' for the corresponding Sheet 1, Column A values into Sheet 2 at the same time; however, I can do that in a separate step once I have filtered Sheet 1, Column A into Sheet 2, Column A based on the values in Sheet 1, Column E.

    The above may be a little confusing. The attached example should help clear it up.

    Thanks in advance. I am not sure if an IF statement is even the best option. Perhaps INDEX/MATCH? Thanks.
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Need Help with IF Statement Formula

    hi Digital2k10, welcome to the forum. try this array formula in Sheet2 A1:
    =INDEX(Sheet1!A$1:A$16,SMALL(IF(Sheet1!$E$1:$E$16=1,ROW(Sheet1!$E$1:$E$16)-ROW(Sheet1!$E$1)+1),ROWS(A$1:A1)))

    you have to paste the formula inside the formula bar & press CTRL + SHIFT + ENTER. When done correctly, you should see curly brackets surrounding it. copy down & across. change the range if necessary

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    02-25-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Need Help with IF Statement Formula

    Thank you benishiryo! That worked perfectly.

    One last thing...If it is not too much to ask, could you please explain the array formula from SMALL( onward? Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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