+ Reply to Thread
Results 1 to 3 of 3

Add Column Cell Values Within Range Selection. Delete Rows

  1. #1
    Registered User
    Join Date
    10-25-2014
    Location
    USA
    MS-Off Ver
    2013
    Posts
    28

    Add Column Cell Values Within Range Selection. Delete Rows

    Hi everyone,

    I am trying to create a quick vba macro that will allow a user to make a row selection ( Rows("2:5").Select ) and sum column D and column E independently. I then tried to add a For loop to delete excess rows. I seem to have encountered some trouble with parts of the vba, and I would be grateful for any suggestions. Thank you!

    Ray

    Test.xlsm

    Please Login or Register  to view this content.

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Add Column Cell Values Within Range Selection. Delete Rows

    I went with:

    Please Login or Register  to view this content.
    When deleting it's usually best to start at the bottom and move up. This is because when you delete a given cell, the cells below it move up and then you skip the row that replaced it.

    By moving up you avoid this issue.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    10-25-2014
    Location
    USA
    MS-Off Ver
    2013
    Posts
    28

    Re: Add Column Cell Values Within Range Selection. Delete Rows

    Thank you for teaching me

+ 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. Delete rows based on values in a column
    By Motox in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-28-2013, 10:00 PM
  2. Replies: 8
    Last Post: 08-08-2013, 08:45 AM
  3. Macro to delete entire rows if cell values do not match list/named range.
    By swolfe2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-17-2013, 02:13 PM
  4. Replies: 5
    Last Post: 11-12-2012, 08:38 PM
  5. Delete Rows based on Values in a column
    By Recycle_Bin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-21-2009, 04:36 PM
  6. Delete Rows If A Column Contains One Of Several Values
    By Kianuz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2009, 06:36 PM
  7. macro to delete rows with a range for values
    By poole in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-28-2009, 02:18 PM
  8. Delete rows with specific column values
    By koklok in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-16-2008, 01:51 PM

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