+ Reply to Thread
Results 1 to 4 of 4

How to resize a range of multiple cells?

  1. #1
    Registered User
    Join Date
    08-18-2015
    Location
    Missouri, USA
    MS-Off Ver
    2010
    Posts
    12

    How to resize a range of multiple cells?

    I have a spreadsheet with data in cells A1:AR1000. Some of the cells are empty. I want to SELECT all the empty cells in row “H”. I then want to DELETE all the empty cells PLUS the five cells to the left of each of the selected cells. In the attached example the macro selects the following cells: H10, H11, H12, H20, H21, H31, H32. Based on the sells now found as empty in row “H” I now want to extend the range for each selected cell. UNFORTUNATELY MY CODE APPEARS TO BE WRONG. At this point I want the macro to select the following cells:
    H10:C10, H11:C11, H12:C12, H20:C20, H21:C21, H31:C31, and H32:C:32. But sadly the range for the selected cells does not change. Please help.
    Note I will always search for empty cells in Column “H” and always resize the range for deletion from column H to Column C. I do not want to delete the entire rows because to do so would result in deleting cells that I needed. The code is:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: How to resize a range of multiple cells?

    Hi RobinMO01,
    try this
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-18-2015
    Location
    Missouri, USA
    MS-Off Ver
    2010
    Posts
    12

    Re: How to resize a range of multiple cells?

    Hi nilem,
    Thank you that is exactly what I needed. You are my hero. I worked hours unsuccessfully trying to get that to work. Thank you and may God bless you!!
    Robin

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: How to resize a range of multiple cells?

    If that takes care of your original question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.

    You may also say thanks to those who have put their time and efforts to help you in this forum by clicking the Add Reputation link under their posts, another way to say thanks.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

+ 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] Resize and move range
    By Jonathan78 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-25-2014, 05:05 AM
  2. Insert picture and resize to range of cells
    By ebahr in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-16-2013, 04:17 PM
  3. [SOLVED] Copy range of cells with Offset/Resize
    By frankie666 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-28-2013, 06:56 AM
  4. Can't get Range.Resize to work
    By philare in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-24-2012, 02:51 AM
  5. How do I Resize a Range?
    By AB33 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-28-2012, 11:18 AM
  6. Resize Range
    By OpusOpus in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 04-03-2010, 01:03 PM
  7. [SOLVED] Resize Range without Select
    By achidsey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-13-2005, 03:06 AM
  8. [SOLVED] Range.Delete and Range.Resize.Name performance issues
    By Test.File in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2005, 12:54 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