+ Reply to Thread
Results 1 to 6 of 6

IF formula but ignore blank and move to next criteria

  1. #1
    Registered User
    Join Date
    08-11-2020
    Location
    London, ENGLAND
    MS-Off Ver
    365
    Posts
    10

    IF formula but ignore blank and move to next criteria

    Hi all,

    Any help would be appreciated. I have a spreadsheet, and I want to take from the main tab and if it meets the criteria take 3 columns to the left.

    So, main sheet has some information on it. If that person is a male, then take all columns to the left, and copy this into the tab for males. And vice versa for female.
    The issue is, it leaves a gap each line down as it searches through the main sheet, if I use=IF('Main sheet'!$E7="yes",'Main sheet'!B7:D7) or false or blanks.
    I don't know if you can make it, look at the data, check it if it meets the criteria, if it doesn't, moves to next line, but this information in male and female tabs doesn't leave blanks each row it doesn't match.


    thanks for any help

    J
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: IF formula but ignore blank and move to next criteria

    Here is a very simple two-query PowerQuery solution:

    M Code (male):

    Please Login or Register  to view this content.
    M Code (female):

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    08-11-2020
    Location
    London, ENGLAND
    MS-Off Ver
    365
    Posts
    10

    Re: IF formula but ignore blank and move to next criteria

    Hi,
    Thank you for your super fast reply. I probably should have explained a little more.
    the male and female tab will have further information manually added each time. So it takes from the main tab, the majority of the information but then someone manually adds some extra column information on each one. So filtering out isn't a option I don't think.
    Any ideas?
    Sorry, I should have been clearer.
    Thanks
    J

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: IF formula but ignore blank and move to next criteria

    It's perfectly possible to add the extra columns you need within PowerQuery, so yes, it can be done with a little foresight - this covers it: https://exceleratorbi.com.au/self-re...s-power-query/
    Last edited by AliGW; 08-31-2020 at 06:20 AM.

  5. #5
    Registered User
    Join Date
    08-11-2020
    Location
    London, ENGLAND
    MS-Off Ver
    365
    Posts
    10

    Re: IF formula but ignore blank and move to next criteria

    Thanks, is there a way to auto refresh? I do you have to manually do it each time?

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: IF formula but ignore blank and move to next criteria

    You can write a worksheet change event to detect when the master table is updated:

    Please Login or Register  to view this content.
    Your range would need to cover the area that the master table might grow to cover (in other words, add as many rows as you think you'll need).

+ 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] Ignore blank cells with formulas or ignore NA() in a formula
    By guiismiti in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 03-24-2016, 02:13 PM
  2. [SOLVED] Formula to ignore blank cells and copy data that meets criteria?
    By Office_Dummy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-27-2014, 12:29 PM
  3. [SOLVED] SUMIFS Formula: Can it ignore a Blank Criteria field?
    By mlj61289 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-17-2013, 12:43 PM
  4. [SOLVED] Autofilter with multiple criteria - how to ignore blank criteria
    By MOONDRIFT47 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-31-2012, 12:20 PM
  5. [SOLVED] How to get Sumproduct to ignore a criteria if it is blank?
    By skysurfer in forum Excel General
    Replies: 3
    Last Post: 04-29-2012, 04:54 PM
  6. Replies: 2
    Last Post: 04-28-2012, 05:13 AM
  7. Replies: 5
    Last Post: 09-07-2011, 11:14 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