+ Reply to Thread
Results 1 to 6 of 6

Removing multiple rows with specified different data, Created macro is deleting everything

  1. #1
    Registered User
    Join Date
    03-06-2015
    Location
    Madison, Wi
    MS-Off Ver
    2010
    Posts
    3

    Removing multiple rows with specified different data, Created macro is deleting everything

    I created a macro to basically clean up information run from another program. The Macro is supposed to find the information I don't want and delete the row. However it is deleting everything instead of the specific information. Please help.


    Sub testingdelete()
    '
    ' testingdelete Macro
    '
    ' Keyboard Shortcut: Ctrl+Shift+D

    Range("B:B").Select
    ActiveCell.FormulaR1C1 = "Select Clerk's AR Menu Option: ^AP"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = _
    " 1 Account Profile [RCDP ACCOUNT PROFILE] (AP)"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = _
    " 2 Workload Assignment Print [IBJD FOLLOW-UP ASSIGN PRINT] (AP)"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = _
    "Type '^' to stop, or choose a number from 1 to 2 :1 AP Account Profile"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = "Select ACCOUNT or BILL NUMBER:"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Searching for a PATIENT, (pointed-to by DEBTOR)"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = _
    " Enrollment Priority: Category: IN PROCESS End Date: "
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = _
    " *** Patient Requires a Means Test ***"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " *** Please update ***"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = "Enter <RETURN> to continue."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = "MEANS TEST REQUIRED"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = _
    " DO NOT TREAT OR SCHEDULE - MT REQUIRED! CALL X"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " ...OK? Yes// (Yes)"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = _
    " Enter ?? for more actions "
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = _
    "BP Bill Profile NA Select New Account EA Exit Action"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = "BT Bill Transactions SS Select Status"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = "Select Action: Quit// QUIT "
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " DP Deposit Processing"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " RP Receipt Processing"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " LP Link Payment To Account"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " AP Account Profile"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " BP Bill Profile"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " BT Bill Transactions"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " TP Transaction Profile"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " LR List Of Receipts Report"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " EX Extended Check/Trace/Credit Card Search"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = _
    " PD Patient Payment/Refund Transaction History Inquiry"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " RH Release Holds on AR"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " TPJI Third Party Joint Inquiry"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Print Bill"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " SU Summary SF215 Report"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = "Select Agent Cashier Menu Option: "
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Audit/Set up a New Accounts Receivable ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " New Bill Forms Print ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Profile of Accounts Receivable"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Update Accounts Receivable ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Adjustment to Accounts Receivable ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Report Menu for Accounts Receivable ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Follow-up Letter Menu ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Establish/Edit Old Bills ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Transaction Profile"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Account Management ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Agent Cashier Menu ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " EDI Lockbox ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " FMS Utilities Menu ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Refund Review and Approve"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = "Select Clerk's AR Menu Option: "
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = "Financial query queued to be sent to HEC..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Administrative Cost Adjustment"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = _
    " Claims Tracking Menu (Combined Functions) ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Clerk's AR Menu ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Consult Service Tracking"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " CPAC Clinical Options ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " CPAC Facility Administrative Menu ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Diagnostic Measures Reports ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Drug File Inquiry"
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " ECME ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " EDI Menu For Electronic Bills ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Enter Lesser DMC Withholding Amount"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Health Summary Menu ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Insurance Payment Trend Report"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " MRA Management Menu ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " On Hold Menu ..."
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Patient Billing Inquiry"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Patient Insurance Menu ..."
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Patient Profile MAS"
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " PCE Encounter Viewer"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Query Medication Copay Billing Events"
    Selection.EntireRow.Delete
    Range("B:B").Select
    ActiveCell.FormulaR1C1 = " Review/Refer TP Bills to RC"
    Selection.EntireRow.Delete

    End Sub

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Removing multiple rows with specified different data, Created macro is deleting everyt

    The Macro is supposed to find the information I don't want and delete the row
    What is the information you don;t want? Said another way, which rows should the macro delete?

  3. #3
    Registered User
    Join Date
    03-06-2015
    Location
    Madison, Wi
    MS-Off Ver
    2010
    Posts
    3

    Re: Removing multiple rows with specified different data, Created macro is deleting everyt

    The information that is in the " " on the code. I need to take that out.

  4. #4
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Removing multiple rows with specified different data, Created macro is deleting everyt

    A lot of your strings start with a space, not sure if intentional or not. I left them in there.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-06-2015
    Location
    Madison, Wi
    MS-Off Ver
    2010
    Posts
    3

    Re: Removing multiple rows with specified different data, Created macro is deleting everyt

    Yes the spaces were intentional....Thank you sooooooooo much it works like a charm!!! Being new to Macros I was so lost and the one I had set up was from a recording so I really couldn't figure out why it was just deleting everything.

  6. #6
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Removing multiple rows with specified different data, Created macro is deleting everyt

    so I really couldn't figure out why it was just deleting everything
    Because basically, you were selecting every row in column B, putting a string in each cell, deleting all the cells, then repeating the process for the next string, 68 times in a row.

    But anyway, any reputation points, (the * in the lower left of my posts) is appreciated.

+ 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] Deleting Rows based on Cell Content - having trouble with it removing too much
    By Zoediak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-13-2014, 03:10 PM
  2. [SOLVED] Help to speed up macro deleting rows with multiple criteria.
    By Norwaydude in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-02-2014, 05:41 PM
  3. Help to speed up macro deleting rows with multiple criteria.
    By Norwaydude in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 06-24-2014, 11:07 PM
  4. [SOLVED] Macro help with combining data across 2 rows (and deleting non-required rows)
    By InnesMcc in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 05-20-2013, 05:21 AM
  5. Deleting multiple rows of data
    By Leal72 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-07-2008, 02:43 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