+ Reply to Thread
Results 1 to 19 of 19

how to make nested if statement for multiple criteria and ignore false's

  1. #1
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    how to make nested if statement for multiple criteria and ignore false's

    I'm trying to pull some data from cells in another sheet but ignore some of it. I'm using this but its not working.

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


    If i just have one IF it works fine but nested is not working.

    Also this formula simply returns a blank cell. Is there a way to have it skip the cell and not return anything?

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: how to make nested if statement for multiple criteria and ignore false's

    Could you send a nonsensitive sample of the source of data and the desired results?

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,742

    Re: how to make nested if statement for multiple criteria and ignore false's

    Quote Originally Posted by kevinu View Post
    I'm trying to pull some data from cells in another sheet but ignore some of it. I'm using this but its not working.

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

    Yes just as rcm says. We'll need context. Please no pics or screenshots. It saves retyping data.

    If you do not know how to do this:


    To attach a file to your post,
    • be sure to desensitize the data
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”

    The file name will appear at the bottom of your reply.
    Dave

  4. #4
    Registered User
    Join Date
    12-21-2015
    Location
    United States
    MS-Off Ver
    2016
    Posts
    62

    Re: how to make nested if statement for multiple criteria and ignore false's

    As the others already said, it's tough without context. I am assuming though you want a blank cell for the values you have listed such as "location", "average", and "combination, and if it is something else to return that cell value.

    If that is the case then use this:

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


    On the other hand, if its the opposite as your title suggests then just replace each "" with the cell reference and the final cell reference with ""

    Quote Originally Posted by kevinu View Post
    I'm trying to pull some data from cells in another sheet but ignore some of it. I'm using this but its not working.

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


    If i just have one IF it works fine but nested is not working.

    Also this formula simply returns a blank cell. Is there a way to have it skip the cell and not return anything?
    Last edited by Skiptomylou; 09-01-2017 at 12:08 AM.

  5. #5
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393
    Quote Originally Posted by rcm View Post
    Could you send a nonsensitive sample of the source of data and the desired results?
    Im out of town but will reply witht that asap. Rhanks for looking at this.

  6. #6
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: how to make nested if statement for multiple criteria and ignore false's

    Here is an example. I'm pulling data from a source (in this case its columns a,b and c. or f, g, and h, I need to get just the numbers and have the results look like columns n, o and p. I dont care about where its placed I just need the numbers only with no spaces above or below or in between.

    The problem is that the data i'm pulling from has 2 different sources and it imports it differently so sometimes there are no words like "location" or "average" and sometimes there are. My current work-round is to have 2 separate versions. 1 for the version with words and one version for without. I'd like to figure out how to pull the data for both on the same version.
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,003

    Re: how to make nested if statement for multiple criteria and ignore false's

    If I understand correctly then the following array entered formula* will do what you want (yields the same values that were manually placed in columns N:P)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Instructions:
    1) Select cell N3,
    2) Paste the formula into the formula bar,
    3) Simultaneously press the Ctrl, Shift and Enter keys,
    4) Drag the fill handle down to row 26 (or further),
    5) While the range N3:N25 is still selected drag the fill handle over to P26.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: how to make nested if statement for multiple criteria and ignore false's

    Jet, I put the formula in the example and it only gave me blank cells. Can you put it in the example and load it up? I followed your instructions but somehow it didnt work correctly.

  9. #9
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,691

    Re: how to make nested if statement for multiple criteria and ignore false's

    well going off your first post and not checking your attachment (can't open it from work) it seems you could take this...
    =IF('Import data'!BQ2="location",if('Import data'!BQ2="average",if('import data"!BQ2="combination")),"",'Import data'!BQ2)
    and change it to this and it should function at least based on what you wrote.
    =IF(OR('Import data'!BQ2="location",'Import data'!BQ2="average",'import data"!BQ2="combination"),"",'Import data'!BQ2)
    and if they are all in the same sheet then this...
    =IF(OR(BQ2="location",BQ2="average",BQ2="combination"),"",BQ2)
    Last edited by Sam Capricci; 09-05-2017 at 11:55 AM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,003

    Re: how to make nested if statement for multiple criteria and ignore false's

    Here is a copy of the file with the array entered formula applied.
    Let us know if you have any questions.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: how to make nested if statement for multiple criteria and ignore false's

    Jet that works great with thesecond set of data but not the first set (a,b,c). There are 2 exceptions to the no letters rule. The example list A,B,C you'll see there are the words AmyL, AmyR, HipL and HipR that neet to be copied over as well. there are no other letters or words that needs to be seen. My example didnt have that one in there sorry for that.

  12. #12
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,742

    Re: how to make nested if statement for multiple criteria and ignore false's

    If I now understand correctly try array entering (Ctrl + Shift + Enter) this in N2, fill down and across until you get blanks.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  13. #13
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,003

    Re: how to make nested if statement for multiple criteria and ignore false's

    Try modifying the array entered formula* so that it reads:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Remember to simultaneously press the Ctrl, Shift and Enter keys.
    In the attached file the modified formula is applied to both ranges.
    Let us know if you have any questions.
    Attached Files Attached Files

  14. #14
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: how to make nested if statement for multiple criteria and ignore false's

    perfect. Thanks

  15. #15
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,003

    Re: how to make nested if statement for multiple criteria and ignore false's

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

  16. #16
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: how to make nested if statement for multiple criteria and ignore false's

    Jete, Can you look at this example. I see that I'm using a two step method to get what I want and want to see if I can make it one step. In the example I have 2 sets of data im pulling from. I have 2 because the data i get comes in 2 different formats. The main difference is where the data is placed and some extra words inbetween. I've labeled it data set 1 and data set 2. I want the formula to work with either sets. On the example sheet data set 1 is column A, data set 2 is column F. I import that by copying rows starting at "loreta absolute power" on down to the end to my workbook - in this case to column M. From M there is a row of helper cells in N that number them from 1 to 5. 1 is those cells after the words "loreta absolute power", 2 is after "loreta coherence", 3 is after "loreta phase", 4 is after "loreta shift" and 5 is after "loreta lock". I want to separate these 5 sections to use in other parts of the workbook. Once they are numbered a formula in O separates the one row in to 5 rows.

    This used to work fine but thats when the program that gave me the data changed is output format. Now the new format has more words in it and is further down the rows. To fix this I used your formula in column W. I'd like to see if I can find a formula that does it in one step. I need the formula to work with both sets of data and give me results like I see in w-y which is just the locations or numbers words AmyL, HipL, AmyR, AmyL in it.

    Again what I have works great and maybe I should let it be, but being an organizer freak I'd like to see if it can be done in one step
    Attached Files Attached Files

  17. #17
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,003

    Re: how to make nested if statement for multiple criteria and ignore false's

    I don't see that going from a two step (actually seems like three steps) to one would be a benefit.
    However, I believe that the first step of getting the data into column H could be automated.
    I am guessing that the data is either sent in the form of 'Data set 1' or 'Data set 2' and not both and to that end I put them on separate sheets.
    The formula that populates H2 and down is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Attached Files Attached Files

  18. #18
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: how to make nested if statement for multiple criteria and ignore false's

    Sorry my explanation was bad. The data as an excel sheet that looks like data set's 1 and 2. I import them and they look like column H. I get either one or the other not both at the same time. So If I get something like set 2 then what I have works fine. But if i get something like set 1 then I have extra stuff in there like "average", "combination", and "location" that are not filtered out. I need the code to work with both in case i get one or the other. So I'm looking for a formula to look at H (which changes depending on the data set) and give me R-V skipping the step of J-O
    Last edited by kevinu; 09-06-2017 at 04:14 PM.

  19. #19
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,742

    Re: how to make nested if statement for multiple criteria and ignore false's

    If I now understand correctly the working data feed will be in column M. Whether it comes from Data set 1 or Data set 2 it will always be the section of either Data set that follows "Collection hardware:"

    With those understandings find these two helper formulas in K:L.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Then this array formula in O1 filled down and across.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    To demonstrate that the helper columns work on either Data set see helpers B:C and G:H as well as the array outputs in V:X and AA:AC.
    BTW: the helpers in B:C and G:H factor out the line "LORETA Neurofeedback ... " but not necessary in K:L.

    (I had to color code them to keep from going dizzy ... )

+ 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. Nested IF Statement returning False
    By pranjal79 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-25-2016, 12:23 PM
  2. Sumproduct function with a nested if statement looking at multiple criteria
    By storkhiw in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-20-2016, 10:31 AM
  3. [SOLVED] Nested IF Statement goes to False
    By unit285 in forum Excel General
    Replies: 14
    Last Post: 11-14-2015, 01:29 PM
  4. [SOLVED] Need IF statement or Macro to make decision based on multiple criteria
    By weddica in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-25-2013, 03:30 PM
  5. [SOLVED] Nested IF statement to return a value based on multiple criteria
    By harrydnyc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-27-2011, 11:45 AM
  6. Nested IF Statement with Multiple Criteria
    By Hoopsah in forum Excel General
    Replies: 6
    Last Post: 07-23-2007, 10:01 AM
  7. How can I make a True or False statement a certain color when usi.
    By Wendy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-28-2005, 02:06 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