+ Reply to Thread
Results 1 to 7 of 7

Removing Rows using IF CONDITION on a separate sheet

  1. #1
    Forum Contributor wedzmer's Avatar
    Join Date
    06-13-2014
    Location
    Philippines
    MS-Off Ver
    2016
    Posts
    422

    Removing Rows using IF CONDITION on a separate sheet

    Hello excelites!

    I am working on a huge number of data on excel but since such file is so big, I took out a sample from what I'm trying to achieve and post it here. My problem is, I'm trying to use an "IF" statement where if - say - a company did not "purchase" anything from us on this said year, then the other sheet should not include them in the tally.

    As you can see, this is my base or reference sheet:

    pic1.png

    On the said sheet, on cell A3, "wonderland" did not purchase an order from our office as was indicated on cell B3.

    Now on this separate sheet,

    pic2.png

    I want this sheet to copy all the companies that purchased from us and neglect or ignore the companies that didn't.
    The statement should've been:

    1. If C2 of "Orders - 2014" = Yes, then copy B2 of "Orders - 2014".
    2. If C2 of "Orders - 2014" = No, then do not copy B2; instead skip to next row.

    How do I formulate that in Excel?

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,617

    Re: Removing Rows using IF CONDITION on a separate sheet

    Hm, I do not think it is the best idea to do this with formula. I'd raher filter adta on column B (=yes) select all visible ctrl+A then ctrl+G -> special -> only visible cells, copy and paste in the second sheet.
    Best Regards,

    Kaper

  3. #3
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Removing Rows using IF CONDITION on a separate sheet

    Hi wedmzer..

    I hope you will realize.. what the problem we are facing in case of picture.. post..
    use this formula..
    12-03-2015 21-52-16.jpg
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  4. #4
    Forum Contributor wedzmer's Avatar
    Join Date
    06-13-2014
    Location
    Philippines
    MS-Off Ver
    2016
    Posts
    422

    Re: Removing Rows using IF CONDITION on a separate sheet

    Hi Debraj Roy,

    I tried to use your formula but it doesn't work on the succeeding cells....

    Here's the sheet.. I'm sorry I used screenshots...


    sample sheet.xlsx

    I would also like to add because I forgot to mention on the original post that there's a 3rd condition supposedly that should be:

    3. If F2>5000, then it should not be included on the tally sheet as well. (even if c3="yes")
    Last edited by wedzmer; 03-12-2015 at 01:07 PM.

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Removing Rows using IF CONDITION on a separate sheet

    b2=IFERROR(INDEX('Orders - 2014'!B$2:B$14,SMALL(IF('Orders - 2014'!$C$2:$C$14="Yes",ROW('Orders - 2014'!$C$2:$C$14)-MIN(ROW('Orders - 2014'!$C$2:$C$14))+1),ROW(A1))),"")
    try this array formula (shift+ctrl+Enter) and copy across
    since it is an array formula please confirm it with (shift+ctrl+Enter)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  6. #6
    Forum Contributor wedzmer's Avatar
    Join Date
    06-13-2014
    Location
    Philippines
    MS-Off Ver
    2016
    Posts
    422

    Re: Removing Rows using IF CONDITION on a separate sheet

    HELLO NFLSALES!!!

    Thanks for your response.. that worked on looking up the company names that purchased. thank you!

    But what about the succeeding cells? and I was looking for the third condition where I'm only going to indicate the sales that are less than 5000.

  7. #7
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Removing Rows using IF CONDITION on a separate sheet

    sorry over sighted your query
    try
    =IFERROR(INDEX('Orders - 2014'!B$2:B$14,SMALL(IF('Orders - 2014'!$C$2:$C$14="Yes",IF('Orders - 2014'!$F$2:$F$14<=4000,ROW('Orders - 2014'!$C$2:$C$14)-MIN(ROW('Orders - 2014'!$C$2:$C$14))+1)),ROW(A1))),"")

+ 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. Copy a row to a separate sheet with a condition
    By malitec in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-26-2014, 02:02 PM
  2. Getting rows from a separate sheet that matches a condition
    By sleepy777 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-11-2014, 11:41 PM
  3. [SOLVED] Removing Rows from one sheet to another sheet based on criteria in column
    By emilyloz in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-29-2013, 02:09 PM
  4. Transposing multiple rows from one sheet into one column on separate sheet
    By zcarroll in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-06-2013, 01:03 PM
  5. [SOLVED] VBA for separate sheet with particular condition
    By santosh226001 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-22-2012, 08:18 AM

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