+ Reply to Thread
Results 1 to 7 of 7

Move Values in range to fill blanks in range grab values for column 2 to fill remaining.

  1. #1
    Registered User
    Join Date
    04-10-2019
    Location
    VA
    MS-Off Ver
    Excel 2010
    Posts
    23

    Question Move Values in range to fill blanks in range grab values for column 2 to fill remaining.

    So the title may be a bit a complicated. Essentially what I'm trying to do is 3 parts.

    1. Column A and B are my to-do section with Column A holding the Task and B the status of the task. So in this part all tasks that have an x in column B get cleared in column A. This part works.

    2. All tasks that did not have a x in column B remain. This is where things get tricky. I'm trying to move all the remaining tasks up the range to to fill in the blanks on that range.

    3. Once those tasks are moved up I need to grab from Column D, which holds my over flow tasks to fill in the remained of the range for Column A. I don't need the entire range filled I just need the over flow moved.

    I believe a large part of my issue is that my tasks in range A has blank cells between the tasks, as I print this file out and sometimes need to add notes to my tasks. This section is actually apart of a larger planner I maintain so I'm trying to maintain my overall layout for this section.

    Attached is a mock up of what I'm trying to do with the code, but like I said the only part I have working right now is part one. Any advice would be greatly appreciated on how to fix this. Even if I have to change the layout.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,633

    Re: Move Values in range to fill blanks in range grab values for column 2 to fill remainin

    You are making the things difficult by such an inefficient data setting.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-10-2019
    Location
    VA
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Move Values in range to fill blanks in range grab values for column 2 to fill remainin

    Yes, I agree there is a more efficient way to run the code, as you've shown. My novice brain is still wrapping itself around for and while loops.

    Your code worked perfectly for part 2 of my project, so thank you for that. Now I just need to figure out part 3. Would you be so kind as to give me some direction on functions I could look into for that piece.

    Thank you again for your help.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,633

    Re: Move Values in range to fill blanks in range grab values for column 2 to fill remainin

    Missed 3)
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-10-2019
    Location
    VA
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Move Values in range to fill blanks in range grab values for column 2 to fill remainin

    You are awesome that worked perfectly. I had to tweak this line a bit as it was clearing everything in those columns

    .ClearContents: .Columns(2).EntireColumn.ClearContents

    but after that now issues.

    Thank you for mush for your help. This would have taken me forever to figure out on my own.

  6. #6
    Registered User
    Join Date
    04-10-2019
    Location
    VA
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Move Values in range to fill blanks in range grab values for column 2 to fill remainin

    Sorry to bother you, but how do I add more rows between tasks?
    I thought increasing the row offset would do it, but it's not making a dent.

    Thank you

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,633

    Re: Move Values in range to fill blanks in range grab values for column 2 to fill remainin

    Please Login or Register  to view this content.

+ 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] Fill blank range with corresponding values..
    By kay007 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-02-2016, 10:02 AM
  2. [SOLVED] VBA to loop and fill blanks with data from left column if values exist in 3 cells?
    By hopegriffin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-04-2016, 05:08 PM
  3. Coloring Interior Fill based on range values
    By Jasrenkai in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-29-2011, 08:18 PM
  4. Fill Blanks vlookup values
    By bolgerot in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-10-2010, 10:51 PM
  5. fill in range of values with Row()
    By ElmerS in forum Excel General
    Replies: 4
    Last Post: 07-21-2009, 12:19 PM
  6. Fill values down to the bottom cell of a column range
    By reclining in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-15-2006, 08:22 AM
  7. fill in data range knowing start and end values
    By Julie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-11-2006, 11:10 AM

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