+ Reply to Thread
Results 1 to 6 of 6

If statement with next record

  1. #1
    Registered User
    Join Date
    05-30-2017
    Location
    Ontario, Canada
    MS-Off Ver
    2013
    Posts
    1

    If statement with next record

    Hi,
    I am looking to use a formula which will eliminate the blank space or "0" if the criteria doesn't match.
    I have a tracking spreadsheet which asks if the order is a Blanket order or not. If yes, then I want the order information to appear in sheet 2 filling out column B, C, D, and on wards. Attached hopefully gives an idea of what I am trying to do. I've tried an If formula, however for the orders which are not Blanket orders, come in as a blank space or "0" which means this spreadsheet would become massive, which I want to avoid. I have attached a template excel file.

    Any help with this would be fantastic!
    Thanks
    Attached Files Attached Files
    Last edited by Plastech; 05-30-2017 at 11:57 AM.

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,372

    Re: If statement with next record

    Welcome to the forum!

    Will you please attach a sample Excel workbook showing what you have tried so far?

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    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
    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
    44,127

    Re: If statement with next record

    You haven't told us what the formula is... A sample sheet would be helpful too...

    however, =IFERROR(1/(1/your_formula),"")

    will remove all those zeros, by converting them to a #DIV/0! error and then removing the error message
    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

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: If statement with next record

    Quote Originally Posted by Glenn Kennedy View Post
    You haven't told us what the formula is... A sample sheet would be helpful too...

    however, =IFERROR(1/(1/your_formula),"")

    will remove all those zeros, by converting them to a #DIV/0! error and then removing the error message
    Note that this will only work on numbers and not on text.

  5. #5
    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
    44,127

    Re: If statement with next record

    True. If your answers are text, then this will work..

    =Your_formula&""

    Edit: I have just seen your sheet.... What do you want copied from where to where??? Did you attach the correct sheet?
    Last edited by Glenn Kennedy; 05-30-2017 at 12:27 PM.

  6. #6
    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
    44,127

    Re: If statement with next record

    Is this what you wanted???

    Variants of the following array formula were used:

    =IFERROR(INDEX(Sheet1!$C:$C,SMALL(IF(Sheet1!$G$3:$G$10="Yes",ROW(Sheet1!$G$3:$G$10)),COLUMNS($B3:B3))),"")

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files

+ 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. Replies: 1
    Last Post: 08-13-2015, 03:19 PM
  2. [SOLVED] Vlookup/if statement??? Need help before i can record a macro
    By pariyahdesign in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-05-2013, 04:19 PM
  3. If statement to evaluate the next record...
    By nessabell3 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-19-2013, 03:12 AM
  4. [SOLVED] Access 2010 unable to use multiple dates in record in SQL SELECT statement
    By Harry73 in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2013, 10:19 PM
  5. Replies: 1
    Last Post: 11-16-2012, 09:25 AM
  6. Command Buttons for Viewing Record, Next Record and Previous Record
    By david1987 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2012, 06:30 AM
  7. Formula too long (nested if statement) - can't record to vba
    By Bear00 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2012, 09:58 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