+ Reply to Thread
Results 1 to 3 of 3

File Cleanup & Insert Data

  1. #1
    Registered User
    Join Date
    08-24-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    17

    File Cleanup & Insert Data

    Hello!

    I have a worksheet that is massive that is used for incentives. It is roughly 50,000 rows by 35 columns wide. It takes quite a bit of time to reoganize it and set it up so that it only contains the data I need. I have to do this once a month and would like to make it easier!

    What I'm looking to be able to do is the following, how hard would it be to do it all in a single macro?

    1) Delete any row where Column O doesn't contain either "CHECKED OUT" or "CHECKED IN"
    2) Delete any row where Column AD is less than 1
    3) Delete any row where Column AF is less than 69
    4) Delete any row where Column AH doesn't equal CKOT
    5) Sort by column X
    6) Insert formulas into columns AJ2:AR2 until the end of the sheet and format them to a predetermined format (i.e. red fill for AJ, blue for AK, etc).

    I can do each of the delete passes as seperate macros, but they go line by line, and as you could imagine it takes forever to go through 50,000 rows to get to the ~30,000 that are actually useful to me. I'm trying to limit the time it takes to clean up this data and my attempts to automate it actually make it take longer (although, less effort but that's useless if it takes it 30min to automatically do it).

    Edit: If I'm not clear on what I'm looking for, tell me and I can try to setup an example sheet, but I cannot supply the actual sheet im using with real data because it contains a significant amount of confidential information.
    Last edited by ryannjohnsonn; 09-24-2012 at 04:48 PM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: File Cleanup & Insert Data

    how can I test the code I'll propose you ?
    If solved remember to mark Thread as solved

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,199

    Re: File Cleanup & Insert Data

    Hi, ryannjohnsonn,

    1 to 4 can be "done" on a new worksheet (for the output) by using the Advanced Filter with a criteria range so that only the sorting and filling of formulas would remain. You were a bit short on what formulas to be used for input.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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