+ Reply to Thread
Results 1 to 12 of 12

Ignoring rows with a blank cell in one column

  1. #1
    Registered User
    Join Date
    02-27-2014
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2007
    Posts
    6

    Ignoring rows with a blank cell in one column

    Hello all,

    this is my first time posting on the forum, but I have been helped many times in the past from all your posts. Thank you in advance for your future help!

    I download a .csv file every week that has thousands of records (rows) with 15 columns of data. I take this data and paste it into a spreadsheet that does many various calculations on other pages within the spreadsheet. I'm trying to make the process "idiot-proof" (pardon the expression) so that once the process of pasting the data is complete, the report is complete.

    I have all my calculations complete, and they work just fine (including a simple macro), but i have one more thing I'd like to do.

    Some of the records (rows) have a blank in one of the columns, and some others have 99999 in a different column. Currently, I filter these rows out and delete them before I copy them over. I want anyone to be able to download this .csv and copy the data into an "import page" but have the sheet reject (delete) any rows that have that blank or the 99999 in the other column and allow the pasting of all other records. My question is, should I use data validation or some other method to automatically delete the row before it is pasted into the sheet?

    Thank you again!
    Tom
    Last edited by twomack1; 11-12-2014 at 12:53 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Ignoring rows with a blank cell in one column

    if is simpler to have a macro delete the rows that you don't need

    Try this.

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 11-12-2014 at 02:29 PM.

  3. #3
    Registered User
    Join Date
    02-27-2014
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Ignoring rows with a blank cell in one column

    Sorry...I didn't see your whole reply. Dumb question, but is that VBA macro automatic, or do I need to make a button?

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Ignoring rows with a blank cell in one column

    If you are pasting data into excel, there is no regular formula that will delete rows - based on anything. Could you modify your formulas to exclude the blanks and the 9999?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    02-27-2014
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Ignoring rows with a blank cell in one column

    Thanks Ford...I was hoping to not have to do that, but if there is no other way, I guess I'll have to...

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Ignoring rows with a blank cell in one column

    You could create a button

    or select maro run from inside the developer menu

  7. #7
    Registered User
    Join Date
    02-27-2014
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Ignoring rows with a blank cell in one column

    Thanks! I'll give it a whirl

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Ignoring rows with a blank cell in one column

    What formulas are you using?

  9. #9
    Registered User
    Join Date
    02-27-2014
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Ignoring rows with a blank cell in one column

    I use Sumproduct a lot to count occurrences based on multiple criteria. I also use my own adaptation of SumSq with multiple criteria because Excel only allows for 250 or so numbers per calculation.

    I had a macro previously for deleting the rows with blanks or 99999's in them but I seem to recall it affected ranges in my formulas. Maybe just a little gun-shy because everything is working perfectly (except this small piece).

    I will try both ways and see if I get a winner. Thanks to both of you for the help!

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Ignoring rows with a blank cell in one column

    Not sure about the sumsq(), but you could add more arguments to the SP to exclude the blanks and 9'?
    Another option may be to add a helper to test for blanks and 9's, and pull in all but those - then base the calcs on that

  11. #11
    Registered User
    Join Date
    02-27-2014
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Ignoring rows with a blank cell in one column

    Yeah, the macro didn't work. It changes the equations in my formulas. I will just rewrite my formulas to exclude the blanks and 99999's.

    Thank you guys, again, for your help!

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Ignoring rows with a blank cell in one column

    Happy to help and thanks for the feedback

+ 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: 12
    Last Post: 03-04-2015, 04:28 PM
  2. Count how often value changes in a column, ignoring blank cells
    By flyaway in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2014, 04:09 AM
  3. [SOLVED] Sorting a text column while ignoring blank cells
    By mic2mic in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-30-2013, 04:58 AM
  4. Replies: 0
    Last Post: 06-25-2012, 03:28 PM
  5. Help with ignoring blank cells when drawing a column chart
    By Iibboh in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-13-2012, 04:24 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